Update conditions for kernel statoverride

With update of ansible version having variables in conditions is not
allowed anymore, which results in error like:
`Conditional is marked as unsafe, and cannot be evaluated`

Change-Id: I6e8e0ee1ffc2c154bac0f64f2e797281d7ba966f
This commit is contained in:
Dmitriy Rabotyagov 2024-06-22 10:23:53 +02:00
parent 4689ed7ebf
commit 6d32065246

View File

@ -24,12 +24,11 @@
- name: Latest kernel readable to nova group/user - name: Latest kernel readable to nova group/user
command: 'dpkg-statoverride --update --add root nova 0640 {{ latest_kernel }}' command: 'dpkg-statoverride --update --add root nova 0640 {{ latest_kernel }}'
register: dpkg_statoverride_result register: dpkg_statoverride_result
changed_when: > changed_when:
'an override for \'{{ latest_kernel }}\' already exists; aborting' - ("an override for '" ~ latest_kernel ~ "' already exists; aborting" not in dpkg_statoverride_result.stderr)
not in dpkg_statoverride_result.stderr failed_when:
failed_when: > - (dpkg_statoverride_result.rc != 0) and
(dpkg_statoverride_result.rc != 0) and ("an override for '" ~ latest_kernel ~ "' already exists; aborting"
('an override for \'{{ latest_kernel }}\' already exists; aborting'
not in dpkg_statoverride_result.stderr) not in dpkg_statoverride_result.stderr)
- name: Script installed to make future kernels readable to nova group/user - name: Script installed to make future kernels readable to nova group/user