I have additional information, such as db connection information, etc., stored in /etc/ansible/facts.d/environment.fact.
They become available as type variables ansible_local.environment.database.name. What is the best way to update the database name?
I tried the set_fact module, but could not correctly update the nested variable. It just overwrites the entire hash ansible_local.
- name: Update database name
set_fact:
args:
ansible_local:
environment:
database:
name: "{{ db_name }}"
source
share