diff --git a/.config/ansible-lint.yml b/.config/ansible-lint.yml new file mode 100644 index 0000000..35556c6 --- /dev/null +++ b/.config/ansible-lint.yml @@ -0,0 +1,3 @@ +--- +skip_list: + - yaml[truthy] diff --git a/galaxy.yml b/galaxy.yml index 10080ae..dab6319 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -16,7 +16,7 @@ readme: README.md # A list of the collection's content authors. Can be just the name or in the format 'Full Name <email> (url) # @nicks:irc/im.site#channel' authors: -- s3lph <1375407-s3lph@users.noreply.gitlab.com> + - s3lph <1375407-s3lph@users.noreply.gitlab.com> ### OPTIONAL but strongly recommended @@ -26,7 +26,7 @@ description: MSA, MTA and MDA with Postfix & Dovecot # Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only # accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file' license: -- MIT + - MIT # A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character # requirements as 'namespace' and 'name' @@ -65,4 +65,3 @@ issues: https://gitlab.com/s3lph/ansible-collection-mailserver/-/issues # uses 'fnmatch' to match the files or directories. Some directories and files like 'galaxy.yml', '*.pyc', '*.retry', # and '.git' are always filtered build_ignore: [] - diff --git a/roles/dovecot/defaults/main/postfix.yml b/roles/dovecot/defaults/main/postfix.yml index 6dc94ed..e4b1d67 100644 --- a/roles/dovecot/defaults/main/postfix.yml +++ b/roles/dovecot/defaults/main/postfix.yml @@ -9,4 +9,3 @@ dovecot_postfix_lmtp_socket_filename: /var/spool/postfix/private/dovecot-lmtp dovecot_postfix_lmtp_socket_mode: "0600" dovecot_postfix_lmtp_socket_owner: postfix dovecot_postfix_lmtp_socket_group: postfix - diff --git a/roles/dovecot/defaults/main/tls.yml b/roles/dovecot/defaults/main/tls.yml index 28f6a7d..63f6051 100644 --- a/roles/dovecot/defaults/main/tls.yml +++ b/roles/dovecot/defaults/main/tls.yml @@ -7,4 +7,4 @@ dovecot_tls_dh_filename: /usr/share/dovecot/dh.pem # generated 2020-12-05, Mozilla Guideline v5.6, Dovecot 2.3.4, OpenSSL 1.1.1d, intermediate configuration # https://ssl-config.mozilla.org/#server=dovecot&version=2.3.4&config=intermediate&openssl=1.1.1d&guideline=5.6 dovecot_tls_min_version: TLSv1.2 -dovecot_tls_cipher_list: "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384" +dovecot_tls_cipher_list: "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384" # noqa yaml[line-length] diff --git a/roles/mailman/defaults/main.yml b/roles/mailman/defaults/main.yml index 515028c..6787c04 100644 --- a/roles/mailman/defaults/main.yml +++ b/roles/mailman/defaults/main.yml @@ -34,7 +34,7 @@ mailman_database_class: mailman.database.mysql.MySQLDatabase # sqlite:///$DATA_DIR/mailman.db # mysql+pymysql://mailman3:mmpass@localhost/mailman3?charset=utf8&use_unicode=1 # postgres://mailman3:mmpass@localhost/mailman3 -mailman_database_url: "mysql+pymysql://{{ mailman_mariadb_user }}:{{ mailman_mariadb_password }}@{{ mailman_mariadb_host }}:{{ mailman_mariadb_port }}/{{ mailman_mariadb_database }}?charset=utf8mb4&use_unicode=1" +mailman_database_url: "mysql+pymysql://{{ mailman_mariadb_user }}:{{ mailman_mariadb_password }}@{{ mailman_mariadb_host }}:{{ mailman_mariadb_port }}/{{ mailman_mariadb_database }}?charset=utf8mb4&use_unicode=1" # noqa yaml[line-length] mailman_database_debug: "no" mailman_logging_format: "%(asctime)s (%(process)d) %(message)s" diff --git a/roles/mailman/handlers/main.yml b/roles/mailman/handlers/main.yml index 5e6f0f3..61bb1fa 100644 --- a/roles/mailman/handlers/main.yml +++ b/roles/mailman/handlers/main.yml @@ -6,15 +6,15 @@ - name: restart mailman3 ansible.builtin.service: - name : mailman3 + name: mailman3 state: restarted - name: restart mailman3-web ansible.builtin.service: - name : mailman3-web + name: mailman3-web state: restarted - name: reload postfix ansible.builtin.service: - name : postfix + name: postfix state: reloaded diff --git a/roles/multischleuder/defaults/main.yml b/roles/multischleuder/defaults/main.yml index b1f61b3..4db2017 100644 --- a/roles/multischleuder/defaults/main.yml +++ b/roles/multischleuder/defaults/main.yml @@ -4,15 +4,15 @@ multischleuder_download: yes multischleuder_service_enabled: yes multischleuder_config: | - + # Configure this to talk to your schleuder-api-daemon. api: url: "https://localhost:4443" token: "130a8c095d14fa51e73727e9d8ef5db3a3bf0cae7d995c1f" cafile: /etc/multischleuder/schleuder-ca.pem - + lists: [] - + # # The Schleuder list to manage. Must exist # - target: global@schleuder.example.org # unmanaged: @@ -38,7 +38,7 @@ multischleuder_config: | # send_conflict_messages: yes # # Whether to notify the target Schleuder's admins about changes. # send_admin_reports: yes - + # Hook this up to your MTA, smtp: hostname: localhost # default: localhost @@ -46,7 +46,7 @@ multischleuder_config: | tls: PLAIN # PLAIN|STARTTLS|SMTPS; default: PLAIN username: admin # optional password: password # optional - + conflict: # How often to notify users about conflicts interval: 604800 # 1 week @@ -62,29 +62,29 @@ multischleuder_config: | # in the conflict. key_template: | Hi {subscriber}, - + While compiling the subscriber list of {schleuder}, your address {subscriber} was subscribed on multiple sub-lists with different PGP keys. There may be something fishy or malicious going on, or this may simply have been a mistake by you or a list admin. - + You have only been subscribed to {schleuder} using the key you have been subscribed with for the *longest* time: - + {chosen} - + Please review the following keys and talk to the admins of the corresponding sub-lists to resolve this issue: - + Fingerprint Sub-List ----------- -------- {affected} - + For your convenience, this message has been encrypted with *all* of the above keys. If you have any questions, or do not understand this message, please refer to your local Schleuder admin, or reply to this message. - + Regards MultiSchleuder {schleuder} # The template used when sending mails to subscribers involved in a user conflict @@ -97,28 +97,28 @@ multischleuder_config: | # in the conflict. user_template: | Hi {subscriber}, - + While compiling the subscriber list of {schleuder}, your key {fingerprint} was used by subscribers on multiple sub-lists with different email adresses. There may be something fishy or malicious going on, or this may simply have been a mistake by you or a list admin. - + You have only been subscribed to {schleuder} using the address you have been subscribed with for the *longest* time: - + {chosen} - + Please review the following adresses and talk to the admins of the corresponding sub-lists to resolve this issue: - + Adress Sub-List ------ -------- {affected} - + For your convenience, this message has been sent to *all* of the above adresses. If you have any questions, or do not understand this message, please refer to your local Schleuder admin, or reply to this message. - + Regards MultiSchleuder {schleuder} diff --git a/roles/postfixadmin/defaults/main.yml b/roles/postfixadmin/defaults/main.yml index e962841..0a70cc3 100644 --- a/roles/postfixadmin/defaults/main.yml +++ b/roles/postfixadmin/defaults/main.yml @@ -63,7 +63,7 @@ postfixadmin_footer_link: 'http://change-this-to-your.domain.tld' postfixadmin_emailcheck_resolve_domain: yes postfixadmin_welcome_text: | Hi, - + Welcome to your new mail account. You can manage your account at {{ postfixadmin_base_url }}/users/login.php @@ -72,7 +72,6 @@ postfixadmin_welcome_text: | Regards {{ postfixadmin_admin_name }} - postfixadmin_create_mailbox_subdirs_prefix: '' postfixadmin_base_url: 'http://localhost/postfixadmin' diff --git a/roles/postfixadmin/tasks/config.yml b/roles/postfixadmin/tasks/config.yml index fadcc26..c87e153 100644 --- a/roles/postfixadmin/tasks/config.yml +++ b/roles/postfixadmin/tasks/config.yml @@ -16,4 +16,4 @@ changed_when: - "'Database is up to date' not in postfixadmin_register_setup_upgrade.content" - "' done' in postfixadmin_register_setup_upgrade.content" - failed_when: '"Something went wrong while trying to apply database updates" in postfixadmin_register_setup_upgrade.content or postfixadmin_register_setup_upgrade.status != 200' + failed_when: '"Something went wrong while trying to apply database updates" in postfixadmin_register_setup_upgrade.content or postfixadmin_register_setup_upgrade.status != 200' # noqa yaml[line-length] diff --git a/roles/postfixadmin/tasks/install.yml b/roles/postfixadmin/tasks/install.yml index 28ed6a2..bf2de6d 100644 --- a/roles/postfixadmin/tasks/install.yml +++ b/roles/postfixadmin/tasks/install.yml @@ -22,7 +22,7 @@ src: "https://github.com/postfixadmin/postfixadmin/archive/refs/tags/postfixadmin-{{ postfixadmin_version }}.tar.gz" dest: "{{ postfixadmin_installation_prefix }}/postfixadmin-{{ postfixadmin_version }}" creates: "{{ postfixadmin_installation_prefix }}/postfixadmin-{{ postfixadmin_version }}/config.inc.php" - extra_opts: [ "--strip-components=1" ] + extra_opts: ["--strip-components=1"] owner: root group: www-data mode: 0755 diff --git a/roles/postsrsd/defaults/main.yml b/roles/postsrsd/defaults/main.yml index 331e1bc..1de3c46 100644 --- a/roles/postsrsd/defaults/main.yml +++ b/roles/postsrsd/defaults/main.yml @@ -11,4 +11,3 @@ postsrsd_reverse_port: 10002 postsrsd_runas: postsrsd postsrsd_listen_addr: 127.0.0.1 postsrsd_chroot: /var/lib/postsrsd - diff --git a/roles/schleuder/defaults/main.yml b/roles/schleuder/defaults/main.yml index 67cf43a..1279b28 100644 --- a/roles/schleuder/defaults/main.yml +++ b/roles/schleuder/defaults/main.yml @@ -25,8 +25,6 @@ schleuder_api_tls_key_file: /etc/schleuder/schleuder-private-key.pem schleuder_valid_api_keys: [] schleuder_cli_users: {} - - schleuder_defaults_send_encrypted_only: true schleuder_defaults_receive_encrypted_only: false schleuder_defaults_receive_signed_only: false @@ -65,8 +63,6 @@ schleuder_defaults_logfiles_to_keep: 2 schleuder_defaults_language: en schleuder_defaults_forward_all_incoming_to_admins: false - - # This is the last commit before schleuder 3.5 was required schleuder_web_install: no schleuder_web_commitish: main @@ -83,4 +79,3 @@ schleuder_web_superadmins: [root@localhost] schleuder_web_lists_on_which_subscribers_may_delete_keys: ["*"] schleuder_web_db_file: /var/lib/schleuder-web/schleuder-web.sqlite3 - diff --git a/roles/schleuder/handlers/main.yml b/roles/schleuder/handlers/main.yml index bccbe42..80e2d4e 100644 --- a/roles/schleuder/handlers/main.yml +++ b/roles/schleuder/handlers/main.yml @@ -8,7 +8,7 @@ ansible.builtin.service: name: schleuder-web state: restarted - + - name: systemctl restart schleuder-api-daemon ansible.builtin.service: name: schleuder-api-daemon diff --git a/roles/schleuder/tasks/install_schleuder.yml b/roles/schleuder/tasks/install_schleuder.yml index 66a2b6b..6e6bc5c 100644 --- a/roles/schleuder/tasks/install_schleuder.yml +++ b/roles/schleuder/tasks/install_schleuder.yml @@ -14,7 +14,7 @@ ansible.builtin.group: name: schleuder system: yes - + - name: create schleuder user ansible.builtin.user: name: schleuder @@ -22,7 +22,7 @@ home: /var/lib/schleuder system: yes shell: /usr/sbin/nologin - + - name: gather service facts ansible.builtin.service_facts: @@ -31,7 +31,7 @@ name: schleuder state: stopped when: "'schleuder.service' in ansible_facts.services" - + - name: install schleuder gem become: yes become_user: schleuder diff --git a/roles/schleuder/tasks/install_web.yml b/roles/schleuder/tasks/install_web.yml index 3616e84..de0a2c6 100644 --- a/roles/schleuder/tasks/install_web.yml +++ b/roles/schleuder/tasks/install_web.yml @@ -17,7 +17,7 @@ home: /var/lib/schleuder-web system: yes shell: /usr/sbin/nologin - + - name: gather service facts ansible.builtin.service_facts: @@ -26,14 +26,15 @@ name: schleuder-web state: stopped when: "'schleuder-web.service' in ansible_facts.services" - + - name: clone schleuder-web git repo become: yes become_user: schleuder-web ansible.builtin.command: - cmd: git clone https://0xacab.org/schleuder/schleuder-web /var/lib/schleuder-web/schleuder-web # noqa command-instead-of-module git module would reset working directory + # git module would reset working directory + cmd: git clone https://0xacab.org/schleuder/schleuder-web /var/lib/schleuder-web/schleuder-web # noqa command-instead-of-module creates: /var/lib/schleuder-web/schleuder-web - + - name: fetch schleuder-web upstream become: yes become_user: schleuder-web diff --git a/roles/spamassassin/tasks/install.yml b/roles/spamassassin/tasks/install.yml index be80dcb..829a116 100644 --- a/roles/spamassassin/tasks/install.yml +++ b/roles/spamassassin/tasks/install.yml @@ -36,4 +36,3 @@ owner: root group: root mode: 0644 -