September 2018
Beginner to intermediate
214 pages
5h 53m
English
As suggested by its name, this module is for user management on a Linux system. As an example, we will make a playbook that creates a system user named install to be used later to manage the remote machine. The playbook script is as follows :
---- name: Linux Module running hosts: servers become: yes gather_facts: false tasks: - name: create a system user to be used by Ansible user: name: install state: present shell: /bin/bash group: sudo system: yes hidden: yes ssh_key_file: .ssh/id_rsa expires: -1
You can always add -v or -vvv if you want extra output when running a playbook. The following screenshot shows the output of a normal run and one with the -v option:
The same module can also be used to remove the ...
Read now
Unlock full access