Code Review
/
ta
/
caas-security.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add EFI support for grub.cfg generation
[ta/caas-security.git]
/
ansible
/
roles
/
security
/
tasks
/
main.yml
diff --git
a/ansible/roles/security/tasks/main.yml
b/ansible/roles/security/tasks/main.yml
index
22e3197
..
acf307a
100644
(file)
--- a/
ansible/roles/security/tasks/main.yml
+++ b/
ansible/roles/security/tasks/main.yml
@@
-27,9
+27,18
@@
- host_os is defined
- host_os.grub2_password | default(False, True)
- host_os is defined
- host_os.grub2_password | default(False, True)
+ - name: check whether grub-efi exists
+ stat:
+ path: /boot/efi/EFI/centos/grub.cfg
+ register: grub_efi_file_stat
+
- name: generate grub config
command: /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
- name: generate grub config
command: /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
+ - name: generate grub-efi config
+ command: /usr/sbin/grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
+ when: grub_efi_file_stat.stat.exists == true
+
- name: chsh/chfn right setting
file:
path: "{{ item }}"
- name: chsh/chfn right setting
file:
path: "{{ item }}"