Hi all, i need to understand how to work with this scenario.
I have this:
- name: “Creating DNS Record In CloudFlare”
hosts: localhost
gather_facts: no
vars:
“prod”:
clfrecord-prod: “prod-{{ carrier }}”
“stage”:
clfrecord-stage: “stage-{{ carrier }”
tasks:
community.general.cloudflare_dns:
zone: domain.net
record: “{{HERE ADD clfrecord}}”
type: CNAME
value: x-x-xxx.elb.x-x-x.amazonaws.com
account_email:
account_api_key:
proxied: yes
I passed the vars “carriers” and “env” from console.
I need to compare the console variable “{{ env }}” and if it matches prod add the value of clfrecord-prod to the “record” field, and if it is stage its corresponding value.
any helps?