equal
deleted
inserted
replaced
14 ansible-playbook -vvv ... |
14 ansible-playbook -vvv ... |
15 |
15 |
16 To debug connection use ``-vvvv``:: |
16 To debug connection use ``-vvvv``:: |
17 |
17 |
18 ansible -vvvv ... |
18 ansible -vvvv ... |
|
19 |
|
20 Print variable value with task ``debug``:: |
|
21 |
|
22 - debug: var=ansible_host |
|
23 - debug: |
|
24 var: ansible_host |
|
25 - debug: |
|
26 msg: "host is {{ ansible_host }}" |
19 |
27 |
20 To debug Python modules set ``ANSIBLE_KEEP_REMOTE_FILES`` to ``1`` (it causes Ansible to leave the |
28 To debug Python modules set ``ANSIBLE_KEEP_REMOTE_FILES`` to ``1`` (it causes Ansible to leave the |
21 exact copy of the Python scripts it executed on the target machine):: |
29 exact copy of the Python scripts it executed on the target machine):: |
22 |
30 |
23 ANSIBLE_KEEP_REMOTE_FILES=1 ansible ... |
31 ANSIBLE_KEEP_REMOTE_FILES=1 ansible ... |
96 =========== |
104 =========== |
97 |
105 |
98 Files, templates, variables definitions are looked in ``files``, ``templates``, ``vars`` role / play |
106 Files, templates, variables definitions are looked in ``files``, ``templates``, ``vars`` role / play |
99 directories first, then in the base directory for role / play. |
107 directories first, then in the base directory for role / play. |
100 |
108 |
|
109 https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html |
|
110 You can also add ``group_vars/`` and ``host_vars/`` directories to your playbook |
|
111 directory. The ansible-playbook command looks for these directories in the current |
|
112 working directory by default. Other Ansible commands (for example, ansible, |
|
113 ansible-console, and so on) will only look for ``group_vars/`` and ``host_vars/`` in the |
|
114 inventory directory. If you want other commands to load group and host variables from a |
|
115 playbook directory, you must provide the ``--playbook-dir`` option on the command line. |
|
116 If you load inventory files from both the playbook directory and the inventory |
|
117 directory, variables in the playbook directory will override variables set in the |
|
118 inventory directory. |
101 https://docs.ansible.com/ansible/latest/user_guide/playbook_pathing.html |
119 https://docs.ansible.com/ansible/latest/user_guide/playbook_pathing.html |
102 Search paths in Ansible. |
120 Search paths in Ansible. |
103 |
121 |
104 Templates |
122 Templates |
105 ========= |
123 ========= |