Skip to content

Instantly share code, notes, and snippets.

@metabsd
Created July 15, 2020 18:57
Show Gist options
  • Save metabsd/1942a4613a75186006c584c1461885cf to your computer and use it in GitHub Desktop.
Save metabsd/1942a4613a75186006c584c1461885cf to your computer and use it in GitHub Desktop.
- name: Network Policy
vars:
temp_var: |
{% if item.source_project != "N/A" %}
- name: "Project"
strValue: "{{ item.source_project }}"
{% endif %}
{% if item.source_sectag != "N/A" %}
- name: "sectag"
strValue: "{{ item.source_sectag }}"
{% endif %}
debug:
var: temp_var | from_yaml
with_items: "{{ cloudvisory_csv.list }}"
when: item.source_project != "N/A" or ( item.source_project != "N/A" and item.source_sectag != "N/A" )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment