System development or Technical something

create user by ansible playbook.

To create user repeatedly, ansible is useful.
I create playbook for password authorization.

[root@cent7devops ansible-test]# cat ./hosts
node01 ansible_host= ansible_user=root
node02 ansible_host= ansible_user=root
node03 ansible_host= ansible_user=root
[root@cent7devops ansible-test]#

ope_pass variable is defined as a password for "opeuser".

[root@cent7devops ansible-test]# cat create_user.yml
- name: user manage
  hosts: grp_node
  - name: Add the user
      name: opeuser
      password: "{{ ope_pass|password_hash('sha512') }}"

[root@cent7devops ansible-test]#

I'd like to execute ansible for only "node01" host. I use "-l node01" option.

[root@cent7devops ansible-test]# ansible-playbook -i hosts create_user.yml --vault-id ./vault.txt -l node01