diff --git a/.gitmodules b/.gitmodules index 59564548..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "roles/re2o-mail-server/templates/re2o-services/mail-server/mail-aliases"] - path = roles/re2o-mail-server/templates/re2o-services/mail-server/mail-aliases - url = https://gitlab.crans.org/nounous/mail-aliases diff --git a/roles/firewall/tasks/main.yml b/roles/firewall/tasks/main.yml deleted file mode 100644 index 9f9e0928..00000000 --- a/roles/firewall/tasks/main.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -- name: Install firewall dependencies - apt: - update_cache: true - install_recommends: false - name: - - python3-iso8601 - - python3-jinja2 - - python3-ldap - register: apt_result - retries: 3 - until: apt_result is succeeded - -- name: Create firewall directory - file: - path: /var/local/firewall - state: directory - mode: '2775' - owner: root - group: _nounou - -- name: Set ACL for firewall directory - acl: - path: /var/local/firewall - default: true - entity: _nounou - etype: group - permissions: rwx - state: query - -- name: Clone firewall repository - git: - repo: 'http://gitlab.adm.crans.org/nounous/firewall.git' - version: "{{ firewall.version }}" - dest: /var/local/firewall - umask: '002' - -- name: Deploy re2o config - template: - src: firewall/re2o-config.ini.j2 - dest: /var/local/firewall/re2o-config.ini - mode: 0600 - owner: root - group: root - -- name: Deploy cron for firewall - template: - src: cron.d/firewall.j2 - dest: /etc/cron.d/firewall diff --git a/roles/firewall/templates/cron.d/firewall.j2 b/roles/firewall/templates/cron.d/firewall.j2 deleted file mode 100644 index 5d6a897b..00000000 --- a/roles/firewall/templates/cron.d/firewall.j2 +++ /dev/null @@ -1,2 +0,0 @@ -{{ ansible_header | comment }} -*/2 * * * * root /usr/bin/python3 /var/local/firewall/firewall.py -q diff --git a/roles/firewall/templates/firewall/re2o-config.ini.j2 b/roles/firewall/templates/firewall/re2o-config.ini.j2 deleted file mode 100644 index 7bf9a4ca..00000000 --- a/roles/firewall/templates/firewall/re2o-config.ini.j2 +++ /dev/null @@ -1,5 +0,0 @@ -{{ ansible_header | comment(decoration='; ') }} -[Re2o] -hostname = {{ re2o.server }} -username = {{ re2o.service_userĀ }} -password = {{ re2o.service_password }} diff --git a/roles/iproute2/tasks/main.yml b/roles/iproute2/tasks/main.yml deleted file mode 100644 index 073cfe54..00000000 --- a/roles/iproute2/tasks/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Deploy table names configuration - template: - src: iproute2/rt_tables.j2 - dest: /etc/iproute2/rt_tables - mode: 0644 - owner: root - group: root diff --git a/roles/iproute2/templates/iproute2/rt_tables.j2 b/roles/iproute2/templates/iproute2/rt_tables.j2 deleted file mode 100644 index aea599bc..00000000 --- a/roles/iproute2/templates/iproute2/rt_tables.j2 +++ /dev/null @@ -1,13 +0,0 @@ -{{ ansible_header | comment }} -# -# reserved values -# -255 local -254 main -253 default -0 unspec -# -# local -# -#1 inr.ruhep -26 zayo diff --git a/roles/nfs-autofs/handlers/main.yml b/roles/nfs-autofs/handlers/main.yml deleted file mode 100644 index b075971f..00000000 --- a/roles/nfs-autofs/handlers/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: Restart autofs service - service: - name: autofs - state: restarted diff --git a/roles/nfs-autofs/tasks/main.yml b/roles/nfs-autofs/tasks/main.yml deleted file mode 100644 index cd757a83..00000000 --- a/roles/nfs-autofs/tasks/main.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -- name: Install autofs - apt: - update_cache: true - name: autofs - register: apt_result - retries: 3 - until: apt_result is succeeded - -- name: Configure autofs deamon - template: - src: "{{ item }}.j2" - dest: "/etc/{{ item }}" - mode: 0644 - loop: - - default/autofs - - auto.master - notify: Restart autofs service - -- name: Configure home-adh autofs - template: - src: "auto.master.d/{{ item.0 }}.j2" - dest: "/etc/auto.master.d/{{ item.0 }}" - mode: "{{ item.1 }}" - loop: - - ["home-adh.autofs", "0644"] - - ["home-adh.sh", "0755"] - notify: Restart autofs service - -- name: Start autofs service - systemd: - name: autofs - enabled: true - state: started diff --git a/roles/nfs-autofs/templates/auto.master.d/home-adh.autofs.j2 b/roles/nfs-autofs/templates/auto.master.d/home-adh.autofs.j2 deleted file mode 100644 index 037f5e2a..00000000 --- a/roles/nfs-autofs/templates/auto.master.d/home-adh.autofs.j2 +++ /dev/null @@ -1,2 +0,0 @@ -{{ ansible_header | comment }} -/home /etc/auto.master.d/home-adh.sh -t600 diff --git a/roles/nfs-autofs/templates/auto.master.d/home-adh.sh.j2 b/roles/nfs-autofs/templates/auto.master.d/home-adh.sh.j2 deleted file mode 100755 index ea85a234..00000000 --- a/roles/nfs-autofs/templates/auto.master.d/home-adh.sh.j2 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -{{ ansible_header | comment }} -exec echo "-fstype=nfs,nosuid nfs.adm.crans.org:/home-adh/$1" diff --git a/roles/nfs-autofs/templates/auto.master.j2 b/roles/nfs-autofs/templates/auto.master.j2 deleted file mode 100644 index 1502faeb..00000000 --- a/roles/nfs-autofs/templates/auto.master.j2 +++ /dev/null @@ -1,29 +0,0 @@ -{{ ansible_header | comment }} -# -# Sample auto.master file -# This is a 'master' automounter map and it has the following format: -# mount-point [map-type[,format]:]map [options] -# For details of the format look at auto.master(5). -# -#/misc /etc/auto.misc -# -# NOTE: mounts done from a hosts map will be mounted with the -# "nosuid" and "nodev" options unless the "suid" and "dev" -# options are explicitly given. -# -#/net -hosts -# -# Include /etc/auto.master.d/*.autofs -# The included files must conform to the format of this file. -# -+dir:/etc/auto.master.d -# -# Include central master map if it can be found using -# nsswitch sources. -# -# Note that if there are entries for /net or /misc (as -# above) in the included master map any keys that are the -# same will not be seen as the first read key seen takes -# precedence. -# -#+auto.master diff --git a/roles/nfs-autofs/templates/default/autofs.j2 b/roles/nfs-autofs/templates/default/autofs.j2 deleted file mode 100644 index dda3c1fe..00000000 --- a/roles/nfs-autofs/templates/default/autofs.j2 +++ /dev/null @@ -1,15 +0,0 @@ -# -# Init system options -{{ ansible_header | comment }} -# -# If the kernel supports using the autofs miscellanous device -# and you wish to use it you must set this configuration option -# to "yes" otherwise it will not be used. -# -USE_MISC_DEVICE="yes" -# -# Use OPTIONS to add automount(8) command line options that -# will be used when the daemon is started. -# -#OPTIONS="" -# diff --git a/roles/re2o-firewall-zamok/tasks/main.yml b/roles/re2o-firewall-zamok/tasks/main.yml deleted file mode 100644 index 79a8e51c..00000000 --- a/roles/re2o-firewall-zamok/tasks/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Deploy firewall configuration for zamok - template: - src: re2o-services/firewall/firewall_config.py.j2 - dest: /var/local/re2o-services/firewall/firewall_config.py - mode: '644' - owner: root - group: root diff --git a/roles/re2o-firewall-zamok/templates/re2o-services/firewall/firewall_config.py.j2 b/roles/re2o-firewall-zamok/templates/re2o-services/firewall/firewall_config.py.j2 deleted file mode 100644 index 17b601b3..00000000 --- a/roles/re2o-firewall-zamok/templates/re2o-services/firewall/firewall_config.py.j2 +++ /dev/null @@ -1,15 +0,0 @@ -# -*- mode: python; coding: utf-8 -*- -{{ ansible_header | comment }} - -### Give me a role - -role = ['users'] - - -### Specify each interface role - -interfaces_type = { - 'routable' : ['eth0.1'], - 'admin' : ['eth0.2'], - 'sortie' : [], -} diff --git a/roles/re2o-mail-server/tasks/main.yml b/roles/re2o-mail-server/tasks/main.yml deleted file mode 100644 index 17efe1c7..00000000 --- a/roles/re2o-mail-server/tasks/main.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -- name: Create re2o-mail-server directory - file: - path: /var/local/re2o-services/mail-server - state: directory - mode: '2775' - owner: root - group: _nounou - -- name: Set ACL for re2o-mail-server directory - acl: - path: /var/local/re2o-services/mail-server - default: true - entity: _nounou - etype: group - permissions: rwx - state: query - -- name: Clone re2o-mail-server repository - git: - repo: 'http://gitlab.adm.crans.org/nounous/re2o-mail-server.git' - dest: /var/local/re2o-services/mail-server - version: crans - umask: '002' - -- name: Create symbolic link to configuration - file: - src: /var/local/re2o-services/config.ini - dest: /var/local/re2o-services/mail-server/config.ini - owner: root - group: root - state: link - -- name: Create generated directory - file: - path: /var/local/re2o-services/mail-server/generated - state: directory - mode: 0755 - owner: root - group: root - -- name: Deploy cron for re2o-mail-server - template: - src: cron.d/re2o-services-mail-server.j2 - dest: /etc/cron.d/re2o-services-mail-server - -- name: Deploy local aliases - template: - src: re2o-services/mail-server/mail-aliases/{{ item }}.j2 - dest: /var/local/re2o-services/mail-server/{{ item }}_local - loop: - - aliases - - virtuals diff --git a/roles/re2o-mail-server/templates/cron.d/re2o-services-mail-server.j2 b/roles/re2o-mail-server/templates/cron.d/re2o-services-mail-server.j2 deleted file mode 100644 index 579f720d..00000000 --- a/roles/re2o-mail-server/templates/cron.d/re2o-services-mail-server.j2 +++ /dev/null @@ -1,2 +0,0 @@ -{{ ansible_header | comment }} -*/5 * * * * root /usr/bin/python3 /var/local/re2o-services/mail-server/main.py diff --git a/roles/re2o-mail-server/templates/re2o-services/mail-server/mail-aliases b/roles/re2o-mail-server/templates/re2o-services/mail-server/mail-aliases deleted file mode 160000 index 1869e9e0..00000000 --- a/roles/re2o-mail-server/templates/re2o-services/mail-server/mail-aliases +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1869e9e08e926da376c2f7a6db69a6a5dc126b86 diff --git a/roles/re2o-notif-users/tasks/main.yml b/roles/re2o-notif-users/tasks/main.yml deleted file mode 100644 index 79a0c932..00000000 --- a/roles/re2o-notif-users/tasks/main.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -- name: Create re2o-notif-users directory - file: - path: /var/local/re2o-services/notif-users - state: directory - mode: '2775' - owner: root - group: _nounou - -- name: Set ACL for re2o-notif-users directory - acl: - path: /var/local/re2o-services/notif-users - default: true - entity: _nounou - etype: group - permissions: rwx - state: query - -- name: Clone re2o-notif-users repository - git: - repo: 'http://gitlab.adm.crans.org/nounous/re2o-notif-users.git' - dest: /var/local/re2o-services/notif-users - version: master - umask: '002' - -- name: Create symbolic link to configuration - file: - src: /var/local/re2o-services/config.ini - dest: /var/local/re2o-services/notif-users/config.ini - owner: root - group: root - state: link - -- name: Deploy cron for re2o-notif-users - template: - src: cron.d/re2o-services-notif-users.j2 - dest: /etc/cron.d/re2o-services-notif-users diff --git a/roles/re2o-notif-users/templates/cron.d/re2o-services-notif-users.j2 b/roles/re2o-notif-users/templates/cron.d/re2o-services-notif-users.j2 deleted file mode 100644 index d82241ea..00000000 --- a/roles/re2o-notif-users/templates/cron.d/re2o-services-notif-users.j2 +++ /dev/null @@ -1,2 +0,0 @@ -{{ ansible_header | comment }} -@hourly root /usr/bin/python3 /var/local/re2o-services/notif-users/main.py diff --git a/roles/re2o-services/tasks/main.yml b/roles/re2o-services/tasks/main.yml deleted file mode 100644 index fedd9a58..00000000 --- a/roles/re2o-services/tasks/main.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -- name: Install re2o-services dependencies - apt: - update_cache: true - name: - - python3-iso8601 - - python3-jinja2 - - python3-requests - register: apt_result - retries: 3 - until: apt_result is succeeded - -- name: Create re2o-services directory - file: - path: /var/local/re2o-services - state: directory - mode: 0755 - owner: root - group: root - -- name: Deploy re2o-services config file - template: - src: re2o-services/config.ini.j2 - dest: /var/local/re2o-services/config.ini - mode: 0600 - owner: root - group: root diff --git a/roles/re2o-services/templates/re2o-services/config.ini.j2 b/roles/re2o-services/templates/re2o-services/config.ini.j2 deleted file mode 100644 index 81aed4ae..00000000 --- a/roles/re2o-services/templates/re2o-services/config.ini.j2 +++ /dev/null @@ -1,9 +0,0 @@ -{{ ansible_header | comment(decoration='# ') }} -[Re2o] -hostname = {{ re2o_services.server }} -username = {{ re2o_services.service.userĀ }} -password = {{ re2o_services.service.password }} - -[Mail] -mailserver = {{ re2o_services.mail_server }} -port = 25