Skip to content

Instantly share code, notes, and snippets.

@lanky
Created September 22, 2016 11:37
Show Gist options
  • Save lanky/597e8d1c249de0ad5c8364edb4364c91 to your computer and use it in GitHub Desktop.
Save lanky/597e8d1c249de0ad5c8364edb4364c91 to your computer and use it in GitHub Desktop.
---
# vim: set ft=ansible:
- name: matching line
vars:
stdout_lines:
- ""
- ""
- "db_instance : localhost"
- "db_type : mongoDB"
- "db_user : "
- "db_pass : "
- "eventlog_enable : 1"
- "scan_result_log_enable : 0"
- "syslog_enable : 0"
- "syslog_ip : "
- "syslog_port : "
- "syslog_facility : "
gather_facts: no
hosts: localhost
tasks:
- debug:
msg: "{{ item }}"
with_items: "{{ stdout_lines }}"
when: item.startswith('scan_result_log_enable')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment