September 2018
Beginner to intermediate
214 pages
5h 53m
English
For this section, we are going to use the test folder to test the new role. First, we need to set up the inventory to match our test environment:
tests/inventory:[linuxserver]node0node1node2
Then, we edit the test.yml file for the test:
tests/test,yml:- hosts: linuxserver remote_user: setup become: yes roles: - samba.lab.edu
When executing the test.yml playbook, we need to add to the ansible-playbook command line the -i option and specify the tests/inventory inventory file we filled earlier. The command line should look like the following:
ansible-playbook tests/test.yml -i tests/inventory
Read now
Unlock full access