Created
March 16, 2018 19:31
-
-
Save naavveenn/490e61df51f28055417bc33994e25a61 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
##Creating multipple users## | |
- hosts: all | |
become: yes | |
gather_facts: no | |
vars_prompt: | |
- name: pass | |
prompt: "Please enter the password" | |
tasks: | |
- name: Creating users | |
user: | |
name: "{{ item }}" | |
password: "{{ pass | password_hash('sha512') }}" | |
shell: /bin/bash | |
generate_ssh_key: yes | |
with_items: | |
- user1 | |
- user2 | |
- user3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment