Skip to content

Instantly share code, notes, and snippets.

@markuman
Created October 16, 2019 09:08
Show Gist options
  • Save markuman/7c10debdce3a9e658d2da1bb3c379365 to your computer and use it in GitHub Desktop.
Save markuman/7c10debdce3a9e658d2da1bb3c379365 to your computer and use it in GitHub Desktop.
- name: build new rules where TG replaces D_TG
set_fact:
NEW_RULES: "{{ NEW_RULES|default([]) + NEW_RULE }}"
vars:
NEW_RULE:
- actions:
- target_group_arn: "{{ TG_ARN }}"
type: "{{ item.actions[0].type }}"
conditions: "{{ item.conditions }}"
is_default: "{{ item.is_default }}"
priority: "{{ item.priority }}"
rule_arn: "{{ item.rule_arn }}"
when: item.actions[0].target_group_arn == D_TG_ARN
with_items: "{{ RULES }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment