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
This commit is contained in:
Emilien Macchi 2020-04-08 10:11:10 -04:00
parent 2a66695dbd
commit 9fefb30c5d
1 changed files with 2 additions and 1 deletions

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))
all_nodes['enabled_services'] = enabled_services