Fix formatting of LXC container config files

Spacing changes were inadvertently introduced in
https://review.opendev.org/742121 which result in duplicate entries
in LXC config files.

This commit reverts to the original formatting with spaces either
side of the '=', although it makes no attempt to fix files which
may already include duplicate entries.

Change-Id: Ia95bbc959b54f494b5861afcb4e84d4c227e7b31
This commit is contained in:
Andrew Bonney 2021-01-27 15:17:32 +00:00
parent ba3a69981a
commit 9a397730b4
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@
- name: Write default container config
lineinfile:
dest: "/var/lib/lxc/{{ inventory_hostname }}/config"
line: "{{ item }}"
line: "{{ item.split('=', 1)[0] }} = {{ item.split('=', 1)[1] }}"
backup: "true"
with_items: "{{ lxc_container_default_config_list | union(lxc_container_config_list) }}"
delegate_to: "{{ physical_host }}"

View File

@ -37,7 +37,7 @@
- lxc_container_list.stdout is search("container3\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3},\s+)*10.100.100.4(,\s+\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*\s+")
- name: Check for the presence of the right app armor profile for container1
command: "grep \"^lxc.apparmor.profile={{ (hostvars[physical_host | default('localhost')]['ansible_distribution'] == 'Debian') | ternary('unconfined', 'lxc-openstack') }}$\" {{ item }}"
command: "grep \"^lxc.apparmor.profile = {{ (hostvars[physical_host | default('localhost')]['ansible_distribution'] == 'Debian') | ternary('unconfined', 'lxc-openstack') }}$\" {{ item }}"
register: container_profile
failed_when: container_profile.rc != 0
with_sequence: start=1 end=3 format=/var/lib/lxc/container%x/config