Advertisement
gregmark

awsCreds.yml

Feb 27th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.72 KB | None | 0 0
  1. ---
  2. # ~/testAwsCreds.yml
  3.  
  4. ### TEST 1
  5. - name: test aws credential on localhost
  6.   hosts: localhost
  7.   connection: local
  8.   gather_facts: no
  9.   vars:
  10.     t1_pretty: "You so pretty."
  11.     t1_ugly: "You so ugly."
  12.   tasks:
  13.  
  14.   - name: pretty
  15.     debug:
  16.       var: t1_pretty
  17.     when: aw_access_key is defined and aws_secret_key is defined
  18.  
  19.   - name: ugly
  20.     debug:
  21.       var: t1_ugly
  22.     when: aw_access_key is not defined or aws_secret_key is not defined
  23.  
  24.  
  25.  
  26. ### TEST 2
  27. - name: Again
  28.   hosts: localhost
  29.   connection: local
  30.   gather_facts: no
  31.   tasks:
  32.  
  33.     - name: Find my AMI
  34.       ec2_ami_facts:
  35.         image_ids: ami-0e6a2971
  36.       register: ami_find_out
  37.  
  38.     - name: print. IT.
  39.       debug:
  40.         var: ami_find_out
  41.  
  42.  
  43. # vim: ts=2 et ft=yaml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement