Skip to content

Instantly share code, notes, and snippets.

@willthames
Created November 17, 2017 07:00
Show Gist options
  • Save willthames/7b4eb02fe07e40d0f4134593b9861669 to your computer and use it in GitHub Desktop.
Save willthames/7b4eb02fe07e40d0f4134593b9861669 to your computer and use it in GitHub Desktop.
- block:
- name: set yaml anchor
set_fact:
aws_connection_info: &aws_connection_info
aws_access_key: "{{ aws_access_key }}"
aws_secret_key: "{{ aws_secret_key }}"
security_token: "{{ security_token }}"
no_log: yes
- name: create WAF IP match
aws_waf_match:
name: "{{ resource_prefix }}_ip_match"
ip_address: "10.0.0.0/8"
type: ip
<<: *aws_connection_info
register: create_waf_ip_match
always:
- name: delete WAF IP match
aws_waf_match:
name: "{{ resource_prefix }}_ip_match"
type: ip
state: absent
<<: *aws_connection_info
ignore_errors: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment