Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - name: set location zone facts
- set_fact:
- fact_zone: "['facter_ec2_metadata']['placement']['availability-zone']"
- - name: quotes
- debug:
- msg: "{{ ['fact_zone'] }}"
- - name: set label zone nodes
- shell: oc label node {{ item }} zone="{{ hostvars[item]['fact_zone'] }}"
- with_items: "{{ groups['nodes']|unique }}"
- ### I want the literal string to access to the hostvar[<item>]['facter_ec2_metadata']['placement']['availability-zone']
- ### I get the following hostvar[<item>]"['facter_ec2_metadata']['placement']['availability-zone']"
- ### What you recommended me gives me hostvar[<item>]['factor_zone']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement