WIP: Keep trying to fix ansible

DO NOT COMMIT.

I'm simply trying to understand why reboot is failing.

This commit adds some debug statements to try to get
a sense for what grubenv looks like.

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago 2020-05-13 10:05:23 -06:00
parent ea79182f72
commit 04f2203e24

View File

@ -15,10 +15,18 @@
- debug:
msg: "want: v{{ want_cgroups }} actual: v{{ current_cgroups }}"
- name: grubenv, pre-edit, cat
shell: cat /boot/grub2/grubenv
register: grubenv
- name: grubenv, pre-edit, show
debug:
msg: "{{ grubenv.stdout_lines }}"
# Update grubenv file to reflect the desired cgroup level
- name: remove cgroup option from kernel flags
shell:
cmd: sed -i -e "s/^\(kernelopts=.*\)systemd\.unified_cgroup_hierarchy=.\(.*\)/\1\2/" /boot/grub2/grubenv
cmd: sed -i -e "s/^\(kernelopts=.*\)systemd\.unified_cgroup_hierarchy=.\(.*\)/\1 \2/" /boot/grub2/grubenv
warn: false
- name: add it with the desired value
@ -27,6 +35,14 @@
warn: false
when: want_cgroups == 1
- name: grubenv, post-edit, cat
shell: cat /boot/grub2/grubenv
register: grubenv
- name: grubenv, post-edit, show
debug:
msg: "post: {{ grubenv.stdout_lines }}"
# If want != have, reboot
- name: reboot and wait
block: