Browse Source

tripleo_all_nodes_data: sort enabled_services (idempotency)

Sorting the enabled_services list so we can have idempotent hieradata
where the content doesn't change between Ansible runs of the
tripleo_all_nodes_data action plugin.

Change-Id: I8f54265dbadf21da6badd690f5cb123b549cf48c
tags/1.4.0
Emilien Macchi 3 months ago
parent
commit
9fefb30c5d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      tripleo_ansible/ansible_plugins/action/tripleo_all_nodes_data.py

+ 2
- 1
tripleo_ansible/ansible_plugins/action/tripleo_all_nodes_data.py View File

@@ -170,8 +170,9 @@ class ActionModule(ActionBase):

enabled_services += self.all_nodes_extra_map_data.get(
'enabled_services', [])
# make enabled_services unique
# make enabled_services unique and sorted
enabled_services = list(set(enabled_services))
enabled_services.sort()

all_nodes['enabled_services'] = enabled_services



Loading…
Cancel
Save