Skip to content

Instantly share code, notes, and snippets.

@naavveenn
Created March 16, 2018 19:31
Show Gist options
  • Save naavveenn/490e61df51f28055417bc33994e25a61 to your computer and use it in GitHub Desktop.
Save naavveenn/490e61df51f28055417bc33994e25a61 to your computer and use it in GitHub Desktop.
---
##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