change service module enabled to true

This commit is contained in:
Ruben Blanco 2023-12-19 14:13:53 +01:00
parent 8a5468b093
commit d49df34eb3
1 changed files with 11 additions and 11 deletions

View File

@ -1,24 +1,24 @@
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Install and configure FAIL2BAN # Install and configure FAIL2BAN
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# comprobe if fail2ban is installed if not then install fail2ban # comprobe if fail2ban is installed if not then install fail2ban
# Gather the package facts # Gather the package facts
#- name: Gather the package facts # - name: Gather the package facts
# package_facts: # package_facts:
# manager: auto # manager: auto
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# install packages if is not in the system # install packages if is not in the system
- name: install fail2ban package if is not in the system - name: install fail2ban package if is not in the system
apt: apt:
name: fail2ban name: fail2ban
state: present state: present
# when: "'fail2ban' not in ansible_facts.packages" # ansible comprobes if is ok its installed # when: "'fail2ban' not in ansible_facts.packages" # ansible comprobes if is ok its installed
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# configure fail2ban # configure fail2ban
# template a file to /etc/fail2ban/jail.local # template a file to /etc/fail2ban/jail.local
- name: template a file to /etc/fail2ban/jail.local - name: template a file to /etc/fail2ban/jail.local
@ -30,11 +30,11 @@
mode: '0644' mode: '0644'
backup: true backup: true
notify: restart fail2ban notify: restart fail2ban
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# service nftables should start on boot. # service nftables should start on boot.
- name: service nftables should start on boot - name: service nftables should start on boot
service: service:
name: "{{ nftables_daemon }}" name: "{{ nftables_daemon }}"
enabled: yes enabled: true
notify: restart nftables notify: restart nftables
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++