Commit 235f54ee authored by nanahira's avatar nanahira

check grub exists

parent 547aec4d
Pipeline #8661 failed with stage
in 1 minute and 42 seconds
- name: check grub exists
become: true
stat:
path: /etc/default/grub
register: grub_exists
- name: grub block
become: true
when: grub_exists.stat.exists
blockinfile:
path: /etc/default/grub
marker: '# {mark} MyCard Init block'
......@@ -18,4 +24,4 @@
- name: update-grub
become: true
shell: update-grub
when: grub_block_result.changed
when: grub_exists.stat.exists and grub_block_result.changed
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment