Created
July 31, 2018 14:08
-
-
Save geekbass/16f95f2193ad36a2e671fd8b7f648b83 to your computer and use it in GitHub Desktop.
Ansible 'when' example for playbook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: hosts | |
vars: | |
tasks: | |
- name: add filebeat yaml config for Non Agents ONLY | |
copy: src=filebeat.yml dest=/etc/filebeat/filebeat.yml owner=root group=root | |
when: "'non-agents' in group_names" | |
- name: add filebeat yaml config for Agents ONLY | |
copy: src=filebeat-agents.yml dest=/etc/filebeat/filebeat.yml owner=root group=root | |
when: "'agents' in group_names" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment