Last active
June 22, 2023 15:33
-
-
Save rafaeltuelho/f908abd9ba0ad51c8f185c14c8b9dd46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Tests playbook | |
hosts: localhost | |
gather_facts: no | |
vars: | |
num_users: 10 | |
infra_template_object: | |
- name: infra | |
autoscale: false | |
total_replicas: 3 | |
total_replicas_min: 3 | |
total_replicas_max: 3 | |
role: infra | |
taints: | |
- key: infra | |
value: reserved | |
effect: NoSchedule | |
- key: infra | |
value: reserved | |
effect: NoExecute | |
instance_type: "m5.4xlarge" | |
conditional_complex_var: |- | |
{{ | |
infra_template_object if num_users >= 10 else {} | |
}} | |
tasks: | |
- name: infra-nodes | |
ansible.builtin.debug: | |
var: conditional_complex_var |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment