Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Created April 16, 2019 01:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nivleshc/f14ad64582a36944911675f46938338c to your computer and use it in GitHub Desktop.
Save nivleshc/f14ad64582a36944911675f46938338c to your computer and use it in GitHub Desktop.
Part 5 of ansible-aws-inventory-main.yml file
tasks:
- name: initialise output files with headers
lineinfile:
state: present
create: yes
path: "{{ lookup('vars', item + outputfile_variablename_suffix) }}"
line: "{{ lookup('vars', item + outputfileheader_variablename_suffix) }}"
insertbefore: BOF
with_items:
- vpc
- subnet
- igw
- cgw
- vgw
- ami
- eip
- snapshot
- volume
- routetable
- securitygroup
- nacl
- ec2
- elb
- rds_instance
- rds_snapshot
- s3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment