Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:ansible-pull [2018/07/21 00:18] billdozor [The Client: Putting It All Together] |
linux_wiki:ansible-pull [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 49: | Line 49: | ||
Example of a playbook tailored for pulling. | Example of a playbook tailored for pulling. | ||
- | < | + | < |
# File: myplaybook.yml | # File: myplaybook.yml | ||
# Description: | # Description: | ||
Line 71: | Line 71: | ||
\\ | \\ | ||
- | File: myrole/ | + | File: myrole/ |
- | < | + | < |
+ | - name: Install my awesome app list | ||
+ | yum: | ||
+ | name: "{{ my_awesome_apps }}" | ||
+ | state: present | ||
+ | notify: restart my awesome service | ||
+ | </ | ||
\\ | \\ | ||
- | File: myrole/ | + | File: myrole/ |
- | < | + | < |
+ | my_awesome_apps: | ||
+ | - myapp1 | ||
+ | - myapp2 | ||
+ | </ | ||
\\ | \\ | ||
- | File: myrole/ | + | File: myrole/ |
- | < | + | < |
+ | - name: restart my awesome service | ||
+ | service: | ||
+ | name: my-awesome-service | ||
+ | state: restarted | ||
+ | </ | ||
---- | ---- |