February 2018
Intermediate to advanced
200 pages
5h 51m
English
Consider the following playbook which we can execute without an inventory:
---- hosts: localhost tasks: - name: get value debug: msg: "The value is: secret-value"
To execute this, we can just run the ansible-playbook command with this playbook:
$ ansible-playbook playbook.yml[WARNING]: Host file not found: /etc/ansible/hosts[WARNING]: provided hosts list is empty, only localhost is availablePLAY [localhost] ***************************************************************TASK [setup] *******************************************************************ok: [localhost]TASK [include secret] **********************************************************ok: [localhost]TASK [get value] *************************************************************** ...
Read now
Unlock full access