Ansible Variable Persistence
Reference: Stackoverflow set_fact module only sets facts available during a run. For persistent facts, you’ll need to either: Static: define them in one of the following: vars/ group_vars/ host_vars/ Dynamic: Assign them to hosts using your language of choice via Ansible’s Dynamic Inventory: ...