diff --git a/tasks/configure_metal_hosts.yml b/tasks/configure_metal_hosts.yml index 6b7e40cf..c16a9f9d 100644 --- a/tasks/configure_metal_hosts.yml +++ b/tasks/configure_metal_hosts.yml @@ -75,6 +75,7 @@ - name: Blacklist kernel modules ansible.builtin.copy: content: |- + # Managed with OpenStack-Ansible {% for module in openstack_host_blacklist_kernel_modules %} blacklist {{ module }} {% endfor %} diff --git a/tasks/main.yml b/tasks/main.yml index 29c15ce3..9d6402cd 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -183,10 +183,10 @@ - openstack_hosts-config - openstack_hosts-systemd when: - - openstack_hosts_systemd_networkd_devices or - openstack_hosts_systemd_networkd_networks or - openstack_hosts_systemd_services or - openstack_hosts_systemd_mounts or - openstack_hosts_journald_config + - openstack_hosts_systemd_networkd_devices | length > 0 or + openstack_hosts_systemd_networkd_networks | length > 0 or + openstack_hosts_systemd_services | length > 0 or + openstack_hosts_systemd_mounts | length > 0 or + openstack_hosts_journald_config | length > 0 tags: - always diff --git a/tasks/openstack_hosts_systemd.yml b/tasks/openstack_hosts_systemd.yml index aa5d4100..381354fa 100644 --- a/tasks/openstack_hosts_systemd.yml +++ b/tasks/openstack_hosts_systemd.yml @@ -22,9 +22,9 @@ systemd_netdevs: "{{ openstack_hosts_systemd_networkd_devices }}" systemd_networks: "{{ openstack_hosts_systemd_networkd_networks }}" when: - - openstack_hosts_systemd_networkd_devices - - openstack_hosts_systemd_networkd_networks - - is_metal + - openstack_hosts_systemd_networkd_devices | length > 0 + - openstack_hosts_systemd_networkd_networks | length > 0 + - is_metal | bool - name: Run the systemd-service role ansible.builtin.include_role: @@ -33,7 +33,7 @@ systemd_slice_name: "{{ openstack_hosts_systemd_slice }}" systemd_services: "{{ openstack_hosts_systemd_services }}" when: - - openstack_hosts_systemd_services + - openstack_hosts_systemd_services | length > 0 - name: Run the systemd mount role ansible.builtin.include_role: @@ -41,10 +41,10 @@ vars: systemd_mounts: "{{ openstack_hosts_systemd_mounts }}" when: - - openstack_hosts_systemd_mounts + - openstack_hosts_systemd_mounts | length > 0 - name: Configure systemd-journald - when: openstack_hosts_journald_config + when: openstack_hosts_journald_config | length > 0 block: - name: Create /etc/systemd/journald.conf.d directory ansible.builtin.file: diff --git a/vars/redhat.yml b/vars/redhat.yml index 451458c2..0ea2cd09 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -106,9 +106,10 @@ _package_repos_trunk: _package_repos: |- {% if openstack_hosts_rdo_repo_type == 'trunk' %} - {{ _package_repos_trunk }} + {% set repos = _package_repos_trunk %} {% else %} - [] + {% set repos = [] %} {% endif %} + {{ repos }} _openstack_ca_bundle_path: /etc/pki/tls/certs/ca-bundle.crt