Playbook

Below is a simple playbook that calls this role (10) at a single host srv.example.com (2)

 1shell> cat lp.yml
 2- hosts: srv.example.com
 3  gather_facts: true
 4  connection: ssh
 5  remote_user: admin
 6  become: yes
 7  become_user: root
 8  become_method: sudo
 9  roles:
10    - vbotka.linux_postinstall

By default, all functionality of the role is disabled. This means that running the above playbook with default variables won’t make any changes. See tasks/main.yml on how to enable particular subsystems either by dedicated Boolean variables or by the non-empty lists.

Note

gather_facts: true (3) must be set to gather facts needed to evaluate OS-specific options of the role. For example, to install packages, the variable ansible_os_family is needed to select the appropriate Ansible module.

See also