linux_wiki:ansible

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:ansible [2018/07/21 00:34]
billdozor [Playbook Directory Structure]
linux_wiki:ansible [2019/05/25 23:50] (current)
Line 278: Line 278:
   * You can test your subset commands like this   * You can test your subset commands like this
     * ad-hoc<code bash>ansible -m setup -a 'gather_subset=!all,!min,distribution' localhost</code>     * ad-hoc<code bash>ansible -m setup -a 'gather_subset=!all,!min,distribution' localhost</code>
 +
 +**Available Fact Subsets**:
 +  * all
 +  * min
 +  * hardware
 +  * network
 +  * virtual
 +  * ohai
 +  * facter
  
 \\ \\
Line 341: Line 350:
     - Navigate to the playbooks directory<code bash>cd ${HOME}/repos/ansible/playbooks/</code>     - Navigate to the playbooks directory<code bash>cd ${HOME}/repos/ansible/playbooks/</code>
     - Copy your playbook template to a new playbook yaml file.<code bash>cp TEMPLATE_PLAYBOOK.yml my_new_playbook.yml</code>     - Copy your playbook template to a new playbook yaml file.<code bash>cp TEMPLATE_PLAYBOOK.yml my_new_playbook.yml</code>
-      - Playbook Template<code bash TEMPLATE_PLAYBOOK.yml># File: TEMPLATE_PLAYBOOK.yml+      - Playbook Template<code yaml TEMPLATE_PLAYBOOK.yml># File: TEMPLATE_PLAYBOOK.yml
 # Description: PLAYBOOK DESCRIPTION HERE # Description: PLAYBOOK DESCRIPTION HERE
 # Last Updated: 2018-03-15 # Last Updated: 2018-03-15
Line 358: Line 367:
   gather_facts: no   gather_facts: no
 </code> </code>
-    - Edit the new playbook<code bash>vim ansible/playbooks/my_new_playbook.yml+    - Edit the new playbook (vim ansible/playbooks/my_new_playbook.yml)<code yaml>
 - hosts: my_ansible_group - hosts: my_ansible_group
   roles:   roles:
  • linux_wiki/ansible.1532147648.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)