From 7abd75bd7375b8052dce1897c45bb4ef694593ec Mon Sep 17 00:00:00 2001 From: Roberto Alfieri Date: Tue, 17 Oct 2023 16:00:36 +0200 Subject: [PATCH] Fix "Too many spaces inside braces" YAML error Signed-off-by: Roberto Alfieri --- roles/edpm_frr/tasks/install.yml | 6 ++-- roles/edpm_iscsid/tasks/install.yml | 10 +++---- roles/edpm_libvirt/tasks/configure.yml | 10 +++---- roles/edpm_libvirt/tasks/install.yml | 10 +++---- roles/edpm_multipathd/tasks/configure.yml | 8 +++--- roles/edpm_neutron_dhcp/tasks/install.yml | 10 +++---- roles/edpm_neutron_sriov/tasks/install.yml | 10 +++---- roles/edpm_nova/tasks/configure.yml | 28 +++++++++---------- roles/edpm_ovn_bgp_agent/tasks/install.yml | 4 +-- .../tasks/deploy_ceilometer.yml | 6 ++-- roles/edpm_users/defaults/main.yml | 6 ++-- roles/edpm_users/meta/argument_specs.yml | 6 ++-- 12 files changed, 57 insertions(+), 57 deletions(-) diff --git a/roles/edpm_frr/tasks/install.yml b/roles/edpm_frr/tasks/install.yml index 7f36514ed..76633c14f 100644 --- a/roles/edpm_frr/tasks/install.yml +++ b/roles/edpm_frr/tasks/install.yml @@ -21,9 +21,9 @@ setype: "{{ item.setype }}" mode: "{{ item.mode }}" loop: - - { 'path': /var/log/containers/frr, 'setype': container_file_t, 'mode': '0750' } - - { 'path': "{{ edpm_frr_config_basedir }}", 'setype': container_file_t, 'mode': '0750' } - - { 'path': /run/frr, 'setype': container_file_t, 'mode': '0755' } + - {'path': /var/log/containers/frr, 'setype': container_file_t, 'mode': '0750'} + - {'path': "{{ edpm_frr_config_basedir }}", 'setype': container_file_t, 'mode': '0750'} + - {'path': /run/frr, 'setype': container_file_t, 'mode': '0755'} - name: Ensure /run/frr is present upon reboot ansible.builtin.copy: diff --git a/roles/edpm_iscsid/tasks/install.yml b/roles/edpm_iscsid/tasks/install.yml index f9afcbec7..c5d38fa45 100644 --- a/roles/edpm_iscsid/tasks/install.yml +++ b/roles/edpm_iscsid/tasks/install.yml @@ -25,11 +25,11 @@ recurse: "{{ item.recurse | default(omit) }}" mode: "{{ item.mode | default(omit) }}" loop: - - { 'path': /etc/iscsi, 'setype': container_file_t, 'mode': '0755' } - - { 'path': /etc/target, 'setype': container_file_t } - - { 'path': /var/lib/iscsi, 'setype': container_file_t } - - { 'path': /var/lib/config-data, 'setype': container_file_t, 'selevel': s0, 'mode': '0755' } - - { 'path': /var/lib/config-data/ansible-generated/iscsid, 'setype': container_file_t, 'mode': '0755' } + - {'path': /etc/iscsi, 'setype': container_file_t, 'mode': '0755'} + - {'path': /etc/target, 'setype': container_file_t} + - {'path': /var/lib/iscsi, 'setype': container_file_t} + - {'path': /var/lib/config-data, 'setype': container_file_t, 'selevel': s0, 'mode': '0755'} + - {'path': /var/lib/config-data/ansible-generated/iscsid, 'setype': container_file_t, 'mode': '0755'} - name: Stat /lib/systemd/system/iscsid.socket ansible.builtin.stat: diff --git a/roles/edpm_libvirt/tasks/configure.yml b/roles/edpm_libvirt/tasks/configure.yml index 47b2a8d7f..78210a6e6 100644 --- a/roles/edpm_libvirt/tasks/configure.yml +++ b/roles/edpm_libvirt/tasks/configure.yml @@ -13,11 +13,11 @@ group: "{{ item.group | default(ansible_user) }}" mode: "{{ item.mode | default(omit) }}" loop: - - { "path": "/var/lib/openstack/config/libvirt"} - - { "path": "/var/lib/openstack/config/containers"} - - { 'path': "/var/lib/nova"} - - { "path": "/etc/tmpfiles.d/", "owner": "root", "group": "root"} - - { "path": "/var/lib/edpm-config/firewall", "owner": "root", "group": "root"} + - {"path": "/var/lib/openstack/config/libvirt"} + - {"path": "/var/lib/openstack/config/containers"} + - {'path': "/var/lib/nova"} + - {"path": "/etc/tmpfiles.d/", "owner": "root", "group": "root"} + - {"path": "/var/lib/edpm-config/firewall", "owner": "root", "group": "root"} - name: Create container config dirs become: true diff --git a/roles/edpm_libvirt/tasks/install.yml b/roles/edpm_libvirt/tasks/install.yml index e7fac27b7..e88fa53db 100644 --- a/roles/edpm_libvirt/tasks/install.yml +++ b/roles/edpm_libvirt/tasks/install.yml @@ -36,13 +36,13 @@ loop: # qemu is not in the libvirt group in the container images so use # mode 755 to make /var/lib/libvirt traversable. - - { "path": "/var/lib/libvirt", "mode": "0755" } - - { "path": "/var/log/containers/libvirt", "mode": "0750" } - - { "path": "/var/log/containers/qemu", "mode": "0750" } + - {"path": "/var/lib/libvirt", "mode": "0755"} + - {"path": "/var/log/containers/libvirt", "mode": "0750"} + - {"path": "/var/log/containers/qemu", "mode": "0750"} # dont set owner/group or mode on these, as they are managed # by other roles, just ensure they exist. - - { "path": "/var/log/containers/stdouts" } - - { "path": "/var/lib/openstack/config/ceph" } + - {"path": "/var/log/containers/stdouts"} + - {"path": "/var/lib/openstack/config/ceph"} - name: Render libvirt container tags: - install diff --git a/roles/edpm_multipathd/tasks/configure.yml b/roles/edpm_multipathd/tasks/configure.yml index e1720214f..1b5ebc20d 100644 --- a/roles/edpm_multipathd/tasks/configure.yml +++ b/roles/edpm_multipathd/tasks/configure.yml @@ -94,10 +94,10 @@ regexp: "^\\s+{{ item.var }}" line: " {{ item.var }} {{ (item.value | bool) | ternary('yes', 'no') }}" loop: - - { var: find_multipaths, value: "{{ edpm_multipathd_find_multipaths }}" } - - { var: recheck_wwid, value: "{{ edpm_multipathd_recheck_wwid }}" } - - { var: skip_kpartx, value: "{{ edpm_multipathd_skip_kpartx }}" } - - { var: user_friendly_names, value: "{{ edpm_multipathd_user_friendly_names }}" } + - {var: find_multipaths, value: "{{ edpm_multipathd_find_multipaths }}"} + - {var: recheck_wwid, value: "{{ edpm_multipathd_recheck_wwid }}"} + - {var: skip_kpartx, value: "{{ edpm_multipathd_skip_kpartx }}"} + - {var: user_friendly_names, value: "{{ edpm_multipathd_user_friendly_names }}"} loop_control: index_var: multipath_var_index diff --git a/roles/edpm_neutron_dhcp/tasks/install.yml b/roles/edpm_neutron_dhcp/tasks/install.yml index 7afefdc9f..ce7b12129 100644 --- a/roles/edpm_neutron_dhcp/tasks/install.yml +++ b/roles/edpm_neutron_dhcp/tasks/install.yml @@ -23,11 +23,11 @@ group: "{{ item.group | default(ansible_user) }}" mode: "{{ item.mode | default(omit) }}" loop: - - {'path': "/var/lib/openstack/config/containers", "mode": "0750" } - - {'path': "/var/lib/neutron", "mode": "0750" } - - {'path': "{{ edpm_neutron_dhcp_agent_config_dir }}", "mode": "0755" } - - {'path': "/var/log/containers/stdouts", "mode": "0755" } - - {'path': "/var/log/containers/neutron", "mode": "0755" } + - {'path': "/var/lib/openstack/config/containers", "mode": "0750"} + - {'path': "/var/lib/neutron", "mode": "0750"} + - {'path': "{{ edpm_neutron_dhcp_agent_config_dir }}", "mode": "0755"} + - {'path': "/var/log/containers/stdouts", "mode": "0755"} + - {'path': "/var/log/containers/neutron", "mode": "0755"} tags: - install - neutron diff --git a/roles/edpm_neutron_sriov/tasks/install.yml b/roles/edpm_neutron_sriov/tasks/install.yml index b71d8cf1c..86b6d6151 100644 --- a/roles/edpm_neutron_sriov/tasks/install.yml +++ b/roles/edpm_neutron_sriov/tasks/install.yml @@ -21,11 +21,11 @@ state: directory mode: "{{ item.mode | default(omit) }}" loop: - - { 'path': "/var/lib/openstack/config/containers", "mode": "0750" } - - { 'path': "/var/lib/neutron", "mode": "0750" } - - { 'path': "{{ edpm_neutron_sriov_agent_config_dir }}", "mode": "0755" } - - { 'path': "/var/log/containers/stdouts" } - - { 'path': "/var/log/containers/neutron" } + - {'path': "/var/lib/openstack/config/containers", "mode": "0750"} + - {'path': "/var/lib/neutron", "mode": "0750"} + - {'path': "{{ edpm_neutron_sriov_agent_config_dir }}", "mode": "0755"} + - {'path': "/var/log/containers/stdouts"} + - {'path': "/var/log/containers/neutron"} tags: - install - neutron diff --git a/roles/edpm_nova/tasks/configure.yml b/roles/edpm_nova/tasks/configure.yml index 8f0b3464a..e24c9b4cd 100644 --- a/roles/edpm_nova/tasks/configure.yml +++ b/roles/edpm_nova/tasks/configure.yml @@ -13,8 +13,8 @@ group: "{{ item.group | default(ansible_user) }}" mode: "{{ item.mode | default(omit) }}" loop: - - { "path": "{{ edpm_nova_config_dest }}", "mode": "0755" } - - { "path": "/var/lib/openstack/config/containers", "mode": "0755" } + - {"path": "{{ edpm_nova_config_dest }}", "mode": "0755"} + - {"path": "/var/lib/openstack/config/containers", "mode": "0755"} - name: Create persistent directories tags: - configure @@ -28,16 +28,16 @@ group: "{{ item.group | default(omit) }}" mode: "{{ item.mode | default(omit) }}" loop: - - { "path": "/var/lib/nova", "mode": "0755" } - - { "path": "/var/lib/_nova_secontext", "mode": "0755" } - - { "path": "/var/lib/nova/instances", "mode", "0755" } - - { "path": "/var/log/containers/nova", "mode": "0750" } - - { "path": "/var/log/containers/stdouts" } - - { "path": "/etc/ceph", "mode": "0750", "owner": "root", "group": "root" } - - { "path": "/etc/multipath" } - - { "path": "/etc/iscsi" } - - { "path": "/var/lib/iscsi" } - - { "path": "/run/openvswitch" } + - {"path": "/var/lib/nova", "mode": "0755"} + - {"path": "/var/lib/_nova_secontext", "mode": "0755"} + - {"path": "/var/lib/nova/instances", "mode", "0755"} + - {"path": "/var/log/containers/nova", "mode": "0750"} + - {"path": "/var/log/containers/stdouts"} + - {"path": "/etc/ceph", "mode": "0750", "owner": "root", "group": "root"} + - {"path": "/etc/multipath"} + - {"path": "/etc/iscsi"} + - {"path": "/var/lib/iscsi"} + - {"path": "/run/openvswitch"} - name: Render nova config files tags: - configure @@ -48,8 +48,8 @@ setype: "container_file_t" mode: "0644" loop: - - { "src": "config.json.j2", "dest": "config.json" } - - { "src": "nova-blank.conf", "dest": "nova-blank.conf" } + - {"src": "config.json.j2", "dest": "config.json"} + - {"src": "nova-blank.conf", "dest": "nova-blank.conf"} notify: - Restart nova diff --git a/roles/edpm_ovn_bgp_agent/tasks/install.yml b/roles/edpm_ovn_bgp_agent/tasks/install.yml index 061191367..9693bb239 100644 --- a/roles/edpm_ovn_bgp_agent/tasks/install.yml +++ b/roles/edpm_ovn_bgp_agent/tasks/install.yml @@ -21,8 +21,8 @@ setype: "{{ item.setype }}" mode: "{{ item.mode }}" loop: - - { 'path': /var/log/containers/ovn-bgp-agent, 'setype': container_file_t, 'mode': '0750' } - - { 'path': "{{ edpm_ovn_bgp_agent_config_basedir }}", 'setype': container_file_t, 'mode': '0750' } + - {'path': /var/log/containers/ovn-bgp-agent, 'setype': container_file_t, 'mode': '0750'} + - {'path': "{{ edpm_ovn_bgp_agent_config_basedir }}", 'setype': container_file_t, 'mode': '0750'} - name: Create directory {{ edpm_ovn_bgp_agent_config_basedir }} become: true diff --git a/roles/edpm_telemetry/tasks/deploy_ceilometer.yml b/roles/edpm_telemetry/tasks/deploy_ceilometer.yml index 4c7d1e010..7782ed92e 100644 --- a/roles/edpm_telemetry/tasks/deploy_ceilometer.yml +++ b/roles/edpm_telemetry/tasks/deploy_ceilometer.yml @@ -25,8 +25,8 @@ mode: "{{ item.mode | default('750') }}" recurse: true loop: - - { "path": "{{ edpm_ceilometer_config_dest }}/containers" } - - { "path": "{{ edpm_ceilometer_config_dest }}/ceilometer" } + - {"path": "{{ edpm_ceilometer_config_dest }}/containers"} + - {"path": "{{ edpm_ceilometer_config_dest }}/ceilometer"} tags: - edpm_telemetry @@ -41,7 +41,7 @@ group: "{{ item.group | default(ansible_user) }}" mode: "{{ item.mode | default(omit) }}" loop: - - { "path": "/var/log/containers/ceilometer", "mode": "0750" } + - {"path": "/var/log/containers/ceilometer", "mode": "0750"} tags: - edpm_telemetry diff --git a/roles/edpm_users/defaults/main.yml b/roles/edpm_users/defaults/main.yml index ffbff4cc2..9b35e812e 100644 --- a/roles/edpm_users/defaults/main.yml +++ b/roles/edpm_users/defaults/main.yml @@ -19,7 +19,7 @@ # All variables within this role should have a prefix of "edpm_users" edpm_users_users: - - { "name": "qemu", "uid": "107", "gid": "107", "shell": "/sbin/nologin", "comment": "qemu user" } - - { "name": "hugetlbfs", "gid": "42477", "group_only": true } + - {"name": "qemu", "uid": "107", "gid": "107", "shell": "/sbin/nologin", "comment": "qemu user"} + - {"name": "hugetlbfs", "gid": "42477", "group_only": true} edpm_users_extra_dirs: - - { "path": "/var/lib/vhost_sockets", "owner": "qemu", "group": "qemu", "setype": "virt_cache_t", "seuser": "system_u", "mode": "0755" } + - {"path": "/var/lib/vhost_sockets", "owner": "qemu", "group": "qemu", "setype": "virt_cache_t", "seuser": "system_u", "mode": "0755"} diff --git a/roles/edpm_users/meta/argument_specs.yml b/roles/edpm_users/meta/argument_specs.yml index 0683a8aa4..f5f9dbfe2 100644 --- a/roles/edpm_users/meta/argument_specs.yml +++ b/roles/edpm_users/meta/argument_specs.yml @@ -17,14 +17,14 @@ argument_specs: edpm_users_users: type: list default: - - { "name": "qemu", "uid": "107", "gid": "107", "shell": "/sbin/nologin", "comment": "qemu user" } - - { "name": "hugetlbfs", "gid": "42477", "group_only": true } + - {"name": "qemu", "uid": "107", "gid": "107", "shell": "/sbin/nologin", "comment": "qemu user"} + - {"name": "hugetlbfs", "gid": "42477", "group_only": true} description: | The list of users and or groups to create on the compute node. edpm_users_extra_dirs: type: list default: - - { "path": "/var/lib/vhost_sockets", "owner": "qemu", "group": "qemu", "setype": "virt_cache_t", "seuser": "system_u", "mode": "0755" } + - {"path": "/var/lib/vhost_sockets", "owner": "qemu", "group": "qemu", "setype": "virt_cache_t", "seuser": "system_u", "mode": "0755"} description: | The list of directories to create on the compute node for communication with host processes. This shoudl only be used for directories that are required to be shared between containers and host processes.