Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- # ~/testAwsCreds.yml
- ### TEST 1
- - name: test aws credential on localhost
- hosts: localhost
- connection: local
- gather_facts: no
- vars:
- t1_pretty: "You so pretty."
- t1_ugly: "You so ugly."
- tasks:
- - name: pretty
- debug:
- var: t1_pretty
- when: aw_access_key is defined and aws_secret_key is defined
- - name: ugly
- debug:
- var: t1_ugly
- when: aw_access_key is not defined or aws_secret_key is not defined
- ### TEST 2
- - name: Again
- hosts: localhost
- connection: local
- gather_facts: no
- tasks:
- - name: Find my AMI
- ec2_ami_facts:
- image_ids: ami-0e6a2971
- register: ami_find_out
- - name: print. IT.
- debug:
- var: ami_find_out
- # vim: ts=2 et ft=yaml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement