change role to common-base-config
This commit is contained in:
parent
e49e94e448
commit
659f093a1e
|
@ -17,10 +17,10 @@
|
||||||
name: hardnening-config-root-user
|
name: hardnening-config-root-user
|
||||||
tags: hardnening-config-root_config
|
tags: hardnening-config-root_config
|
||||||
|
|
||||||
- name: "[BASE CONFIG] Configure debian os"
|
- name: "[COMMON BASE CONFIG] Configure debian os"
|
||||||
import_role:
|
import_role:
|
||||||
name: base-config-debian-os
|
name: common-base-config-debian-os
|
||||||
tags: base-os_config
|
tags: common-base-os_config
|
||||||
|
|
||||||
- name: "[FAIL2BAN CONFIG] Install and configure fail2ban service"
|
- name: "[FAIL2BAN CONFIG] Install and configure fail2ban service"
|
||||||
import_role:
|
import_role:
|
||||||
|
@ -65,7 +65,7 @@ handlers:
|
||||||
- base-config-debian-os
|
- base-config-debian-os
|
||||||
- configure-fail2ban
|
- configure-fail2ban
|
||||||
- nagios-nrpe
|
- nagios-nrpe
|
||||||
- server-type
|
#- server-type # Eliminada se aplica en common-base-config-debian
|
||||||
- add-repos-vn
|
- add-repos-vn
|
||||||
- vim-options
|
- vim-options
|
||||||
- configure-bashrc
|
- configure-bashrc
|
||||||
|
|
|
@ -207,14 +207,14 @@
|
||||||
|
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
# configure sudo for sysadmin group
|
# configure sudo for sysadmin group
|
||||||
# add sysadmin group to sudoers
|
# paso1 - add sysadmin group to sudoers
|
||||||
- name: Add sysadmin group to sudoers
|
- name: Add sysadmin group to sudoers
|
||||||
file:
|
file:
|
||||||
path: /etc/sudoers.d/vn
|
path: /etc/sudoers.d/vn
|
||||||
state: touch
|
state: touch
|
||||||
mode: u=rw,g=r,o=r
|
mode: u=rw,g=r,o=r
|
||||||
|
|
||||||
# add a line to /etc/sudoers.d/vn file
|
# paso2 - add a line to /etc/sudoers.d/vn file
|
||||||
- name: add a line to /etc/sudoers.d/vn file
|
- name: add a line to /etc/sudoers.d/vn file
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: "/etc/sudoers.d/vn"
|
path: "/etc/sudoers.d/vn"
|
||||||
|
@ -222,7 +222,7 @@
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
# Proteger grub
|
# paso1 - Proteger grub
|
||||||
- name: GRUB password boot protection
|
- name: GRUB password boot protection
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: /etc/grub.d/40_custom
|
path: /etc/grub.d/40_custom
|
||||||
|
@ -231,12 +231,33 @@
|
||||||
password_pbkdf2 {{ user_grub }} {{ code_grub }}
|
password_pbkdf2 {{ user_grub }} {{ code_grub }}
|
||||||
register: grub_register
|
register: grub_register
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
# update grub
|
# paso2 - update grub
|
||||||
- name: update grub config
|
- name: update grub config
|
||||||
command: update-grub
|
command: update-grub
|
||||||
when: grub_register.changed
|
when: grub_register.changed
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
# Install and configure FAIL2BAN
|
# paso1 - Install guest-side qemu-system agent
|
||||||
|
- name: Install guest-side qemu-system agent
|
||||||
|
apt:
|
||||||
|
name: qemu-guest-agent
|
||||||
|
state: present
|
||||||
|
tags: install-qemu-guest
|
||||||
|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
# descargar http://apt.verdnatura.es/pool/main/v/vn-host/vn-host_2.0.2_all.deb e instalar (manualmente wget + dpkg -i package)
|
||||||
|
# paso0 - añadir clave gpg
|
||||||
|
# paso1 - Add specified repository into sources list
|
||||||
|
#- name: Add specified repository into sources list
|
||||||
|
# apt_repository:
|
||||||
|
# repo: deb http://apt.verdnatura.es/ bookworm main
|
||||||
|
# state: present
|
||||||
|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
# paso2 - Add source repository into sources list
|
||||||
|
#- name: Add source repository into sources list
|
||||||
|
# apt_repository:
|
||||||
|
# repo: deb-src http://apt.verdnatura.es/ bookworm main
|
||||||
|
# state: present
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
Loading…
Reference in New Issue