Use this tag for questions regarding Ansible facts - values discovered by the setup module of Ansible or pulled from ohai/facter.
Questions tagged [ansible-facts]
768 questions
-3
votes
1 answer
ansible - FAILED! => {"msg": "'failed' is not a valid option in debug"}
In the below code:
---
- name: set task definition facts
set_fact:
todobackend_task_def_arn:
"{{ cf_stack.stack_outputs.TodobackendTaskDefinition | regex_replace('^(.*):[\\d]*$', '\\1') }}"
todobackend_adhoc_task_def_arn:
"{{…

overexchange
- 15,768
- 30
- 152
- 347
-3
votes
3 answers
Using python variables in ansible
I tried this one
---
- name: py
hosts: master
tasks:
- name:
command: /home/vagrant/test.py
register: csvfile
changed_when: false
- debug:
var: csvfile
- name: Create csvfile directories
file:
path: "/tmp/{{…

Sumanth
- 1
- 2
-3
votes
1 answer
Read vars from CSV file using Ansible
Please see my existing code and this is working fine as expected.
From below code you can see that I have statically defined the vars for list3 and list4:
- hosts: localhost
gather_facts: false
tasks:
- name: "set fact for snow"
…

mikeraj2019
- 39
- 2
- 10