23 lines
547 B
Markdown
23 lines
547 B
Markdown
# 1 - Run Playbook
|
|
|
|
This exercise introduces you to running playbook. The playbook is already written.
|
|
|
|
## Visualize the playbook
|
|
|
|
The playbook is named `ping.yml`. Open it with your favorite editor.
|
|
|
|
## Run the playbook
|
|
|
|
Run the playbook with the inventory file adapted to your lab setup:
|
|
```bash
|
|
ansible-playbook -i ../hosts ping.yml
|
|
```
|
|
|
|
## Pass args on the command line
|
|
|
|
Now change the value of the `ping` output with overwriting the `ping_output` vars.
|
|
|
|
```bash
|
|
ansible-playbook -v -i ../hosts ping.yml -e "ping_output=Ansible is great"
|
|
```
|
|
|