From 8fdc815a24de61a897425a68ece320ef43d64c77 Mon Sep 17 00:00:00 2001 From: binary Date: Tue, 8 Sep 2020 18:42:46 +0200 Subject: cleanup from old roles --- roles/setup_fail2ban/tasks/main.yml | 72 ----------------------------- roles/setup_firewalld/tasks/main.yml | 15 ------ roles/setup_mkdocs/templates/mkdocs.service | 27 ----------- 3 files changed, 114 deletions(-) delete mode 100644 roles/setup_fail2ban/tasks/main.yml delete mode 100644 roles/setup_firewalld/tasks/main.yml delete mode 100644 roles/setup_mkdocs/templates/mkdocs.service diff --git a/roles/setup_fail2ban/tasks/main.yml b/roles/setup_fail2ban/tasks/main.yml deleted file mode 100644 index d96bc07..0000000 --- a/roles/setup_fail2ban/tasks/main.yml +++ /dev/null @@ -1,72 +0,0 @@ - -# =========================================================================== # -# __ ____ _ _____ __ -# _________ / /__ / __/___ _(_) /__ \ / /_ ____ _____ -# / ___/ __ \/ / _ \ / /_/ __ `/ / /__/ // __ \/ __ `/ __ \ -# / / / /_/ / / __/ / __/ /_/ / / // __// /_/ / /_/ / / / / -# /_/ \____/_/\___(_) /_/ \__,_/_/_//____/_.___/\__,_/_/ /_/ -# -# =========================================================================== # - ---- -- name: Check installation of fail2ban - package: - name: fail2ban - state: present - -- name: Check existence of fail2ban config file -- jail.local - stat: - path: /etc/fail2ban/jail.local - register: stat_result - -- name: Backing up ancient fail2ban config file -- jail.local.backup - shell: cp /etc/fail2ban/jail.local /etc/fail2ban/jail.local.backup - when: stat_result.stat.exists - -- name: Copy fail2ban jail.local - copy: - src: jail.local - dest: /etc/fail2ban/ - owner: root - group: root - mode: "0644" - -- name: Copy fail2ban path-defaults.conf - copy: - src: jail.local - dest: /etc/fail2ban/ - owner: root - group: root - mode: "0644" - -- name: Copy fail2ban path-defaults.conf - copy: - src: jail.local - dest: /etc/fail2ban/ - owner: root - group: root - mode: "0644" - -- name: Copy fail2ban jail-sshd.conf - copy: - src: jail-sshd.conf - dest: /etc/fail2ban/jail.d - owner: root - group: root - mode: "0644" - -- name: Copy fail2ban jail-lighttpd.conf - copy: - src: jail-lighttpd.conf - dest: /etc/fail2ban/jail.d - owner: root - group: root - mode: "0644" - when: inventory_hostname in groups["server-web"] - - -- name: Restart fail2ban service - systemd: - name: fail2ban - enabled: yes - state: restarted diff --git a/roles/setup_firewalld/tasks/main.yml b/roles/setup_firewalld/tasks/main.yml deleted file mode 100644 index 62d8240..0000000 --- a/roles/setup_firewalld/tasks/main.yml +++ /dev/null @@ -1,15 +0,0 @@ - -# =========================================================================== # -# __ _____ ____ __ -# _________ / /__ / __(_)_______ _ ______ _/ / /___/ / -# / ___/ __ \/ / _ \ / /_/ / ___/ _ \ | /| / / __ `/ / / __ / -# / / / /_/ / / __/ / __/ / / / __/ |/ |/ / /_/ / / / /_/ / -# /_/ \____/_/\___(_) /_/ /_/_/ \___/|__/|__/\__,_/_/_/\__,_/ -# -# =========================================================================== # - ---- -- name: Check installation of firewalld - package: - name: firewalld - state: present diff --git a/roles/setup_mkdocs/templates/mkdocs.service b/roles/setup_mkdocs/templates/mkdocs.service deleted file mode 100644 index eecd126..0000000 --- a/roles/setup_mkdocs/templates/mkdocs.service +++ /dev/null @@ -1,27 +0,0 @@ - -# =========================================================================== # -# _ __ __ __ _ -# __ ______ (_) /_ _______ ______ _____/ /_/ /_ (_)___ ____ _ -# / / / / __ \/ / __/ / ___/ / / / __ \/ ___/ __/ __ \/ / __ \/ __ `/ -# / /_/ / / / / / /__ (__ ) /_/ / / / / /__/ /_/ / / / / / / / /_/ / -# \__,_/_/ /_/_/\__(_) /____/\__, /_/ /_/\___/\__/_/ /_/_/_/ /_/\__, / -# /____/ /____/ -# -# =========================================================================== # - -[Unit] -Description=Webserver for markdown documentation - -[Service] -Type=simple -User={{ mkdocs_user }} -WorkingDirectory={{ mkdocs_files_directory }} -ExecStart=mkdocs serve --dev-addr {{g_ip_mkdocs_gui}}:{{g_port_mkdocs_gui }} -ExecStop=/bin/kill -s HUP $MAINPID -RuntimeDirectoryMode=0700 - -Restart=on-failure -RestartSec=60s - -[Install] -WantedBy=default.target -- cgit v1.2.3