Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: Create linux user with bash shell and passwordable login
- hosts: remote_nodes
- become: true
- vars_files:
- - gen_password.vars
- tasks:
- - name: create user
- ansible.builtin.user:
- name: "{{ static_username }}"
- shell: "/bin/bash"
- password: "{{ static_password | password_hash('sha512') }}"
- create_home: true
- state: present
- - name: Unlock user account (if locked)
- ansible.builtin.user:
- name: "{{ static_username }}"
- state: present
- password_lock: no
Add Comment
Please, Sign In to add comment