Reputation: 33
I have the below task
- name: "PATCH| 1.5.2 | Ensure bootloader password is set"
ansible.builtin.expect:
command: grub2-setpassword
responses:
Enter password: "{{ grub_password }}"
Confirm password: "{{ grub_password }}"
creates: /boot/grub2/user.cfg
notify: grub2-mkconfig
no_log: true
tags:
- fix
when I run the task the password is set but the file is not created. I have checked multiple issue with expect module but I don't see any that touch on the creates
option. I tried different servers and got the same thing. without the creates
option the password is set as well. Any help in troubleshooting why the file isn't being created will be appreciated.
Upvotes: 0
Views: 67
Reputation: 39
Try this one instead
Upvotes: -2