--- # # This task sets up mail aliases scripts # It installs python packages, scripts and configure cron to run it. # - name: Install python packages ansible.builtin.package: state: present name: - python3-aiohttp - python3-requests tags: - install - packager_alias # Email alias set-up - name: Install the Python script to get the -owner email alias ansible.builtin.copy: src: owner-email-from-pagure.py dest: /usr/local/bin/owner-email.py owner: root group: root mode: "0755" tags: - install - packager_alias - name: Install the script to generate the -owner email alias ansible.builtin.copy: src: package-owner-aliases.sh dest: /usr/local/bin/package-owner-aliases.sh owner: root group: root mode: "0755" tags: - install - packager_alias - name: Configure cron to generate the -owner email alias cron: name="package-owner-aliases" minute="49" user="root" hour="*/3" job="/usr/local/bin/lock-wrapper package-owner-aliases /usr/local/bin/package-owner-aliases.sh" cron_file=package-owner-aliases tags: - install - packager_alias - name: Remove the old -owner email alias script ansible.builtin.file: path: /etc/cron.hourly/package-owner-aliases.sh state: absent tags: - packager_alias # # Since this host has mail aliases, it's a mail hub. Compress logs since there will be a ton of them # - name: Install modified logrotate syslog script to compress maillog on mailhub ansible.builtin.copy: src=syslog dest=/etc/logrotate.d/syslog owner=root group=root tags: - install - packager_alias