rol and playbook secure grub
This commit is contained in:
parent
75a6bdf201
commit
519cacbbb5
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
- hosts: '{{ ip_addr }}'
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
gather_facts: yes
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: "[CONFIG SECURE GRUB] configure secure grub"
|
||||||
|
import_role:
|
||||||
|
name: config-secure-grub
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
# update grub
|
||||||
|
- name: grub register
|
||||||
|
command: update-grub
|
|
@ -0,0 +1,13 @@
|
||||||
|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
# Secure GRUB edition with password
|
||||||
|
# paso1 - Proteger grub
|
||||||
|
- name: GRUB password boot protection
|
||||||
|
blockinfile:
|
||||||
|
path: /etc/grub.d/40_custom
|
||||||
|
block: |
|
||||||
|
set superusers="{{ user_grub }}"
|
||||||
|
password_pbkdf2 {{ user_grub }} {{ code_grub }}
|
||||||
|
notify: grub register
|
||||||
|
tags:
|
||||||
|
- grub-password
|
||||||
|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
user_grub: admin
|
||||||
|
code_grub: grub.pbkdf2.sha512.10000.C91C8756466E7DB535C77DB7FBDBF3D33A39A0712DE3A9AFD38BE2229139E86F23C4E007E6B76DDFDBBE4B2B32764B4EFFECF208C70BA9FECC6BB3FF68A6BA05.8EA3857B795AF29FF5C6E003E31EC4D79B84813175C7A56A8A12F3F30A19B501D7127C0307277FB37073EE0246BCFDA9BD4EDDC3A1EE8176D25CD37B7FB07AF7
|
Loading…
Reference in New Issue