amazon web services - Create ubuntu user on instance launch ansible aws -


i using ansible launch aws instance. there default user on aws instance called "ubuntu" , need setup new user. here guide setup user manually, there way automatically via ansible?

here's version, 1 avoid using shell module , instead use native user module, same thing authorized_keys

--- - hosts: "{{ host_name }}"   become: yes   become_method: sudo   tasks:   - name: create user deploy     user: name=deploy comment="the deploy user" group=admin shell=/bin/bash   - name: copy deploy's authorized_keys file     authorized_key: user=deploy key="your_authorized_key_file_name" 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -