We’re upgrading an old AWX version 4.0 to the latest available at this moment 14.1.
This inventory source filter works in the old version but fails in the new AWX:
host_filters: [“{{ config.name != ‘host02’ }}”,“{{ config.name != ‘host03’ }}”,“{{ config.name != ‘host04’ }}”]
Receiving error below at the beginning of the sync process:
Traceback (most recent call last): File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/tasks.py”, line 1383, in run args = self.build_args(self.instance, private_data_dir, passwords) File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/tasks.py”, line 2594, in build_args args.append(self.pseudo_build_inventory(inventory_update, private_data_dir)) File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/tasks.py”, line 2619, in pseudo_build_inventory content = injector.inventory_contents(inventory_update, private_data_dir) File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/models/inventory.py”, line 1631, in inventory_contents self.inventory_as_dict(inventory_update, private_data_dir), File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/models/inventory.py”, line 2182, in inventory_as_dict for hf in host_filters.split(‘,’): AttributeError: ‘list’ object has no attribute ‘split’
How can I exclude multiple hosts in this filter?