Re: [ansible-project] Need clarification on set_fact module

2021-06-21 Thread Dick Visser
On Mon, 21 Jun 2021 at 20:54, Vikram S wrote: > > Hi, > > Yes, i did. As i have given in above script, below command is added to the > task. > cacheable: yes Setting cacheable means that it will be cached if you enable it. Those are two different things. https://docs.ansible.com/ansible/lates

Re: [ansible-project] Need clarification on set_fact module

2021-06-21 Thread Vikram S
Hi, Do youmean that if in addition to adding 'cacheable: yes' in set_fact task, i should also be adding below config in ansible.cfg? If so, i didn't add it but i can test. gathering = smart fact_caching = jsonfile fact_caching_connection = /tmp/facts_cache fact_caching_timeout = 7200 Regards,

Re: [ansible-project] Need clarification on set_fact module

2021-06-21 Thread Vikram S
Hi, Yes, i did. As i have given in above script, below command is added to the task. cacheable: yes Regards, Vikram On Monday, 21 June, 2021 at 11:56:30 pm UTC+5:30 dick@geant.org wrote: > On Mon, 21 Jun 2021 at 19:09, Vikram S wrote: > >> Ansible documentation for set_fact module says

Re: [ansible-project] Need clarification on set_fact module

2021-06-21 Thread Dick Visser
On Mon, 21 Jun 2021 at 19:09, Vikram S wrote: > Ansible documentation for set_fact module says "Set cacheable to yes to > save variables across executions using a fact cache". > It also says "This boolean converts the variable into an actual 'fact' which will also be added to the fact cache, if f

Re: [ansible-project] Need clarification on set_fact module

2021-06-21 Thread Vikram S
Hi, Yes, i run them against the same host. But both these playbooks are executed separately. Regards, Vikram On Monday, 21 June, 2021 at 10:57:01 pm UTC+5:30 dick@geant.org wrote: > Are these plays run against the same host? > > On Mon, 21 Jun 2021 at 19:09, Vikram S wrote: > >> Ansible d

Re: [ansible-project] Need clarification on set_fact module

2021-06-21 Thread Dick Visser
Are these plays run against the same host? On Mon, 21 Jun 2021 at 19:09, Vikram S wrote: > Ansible documentation for set_fact module says "Set cacheable to yes to > save variables across executions using a fact cache". So my understanding > is that setting 'cacheable: yes' would make the content

[ansible-project] Need clarification on set_fact module

2021-06-21 Thread Vikram S
Ansible documentation for set_fact module says "Set cacheable to yes to save variables across executions using a fact cache". So my understanding is that setting 'cacheable: yes' would make the contents of custom variable available across differnt playbooks (as opposed to default behaviour of