Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: all
- gather_facts: yes
- ##
- # Create the password then create the user
- #
- - name: Users | Generate password for new user
- shell: makepasswd --chars=20
- register: user_password
- - name: Users | Create new user
- user: name=new-user createhome=yes home=/home/new-user generate_ssh_key=yes shell=/bin/bash password=${user_password.stdout}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement