diff --git a/hosts b/hosts index 9837f34..69392e7 100644 --- a/hosts +++ b/hosts @@ -60,7 +60,6 @@ freeradius.universe.local backup.universe.local [database] -coruscant.universe.local mariadb01.universe.local mariadb02.universe.local mariadb03.universe.local @@ -71,7 +70,6 @@ endorvm.universe.local tuxedo-book-xp1511.universe.local [dhcpserver] -coruscant.universe.local dhcp-kea.universe.local [docker] @@ -91,7 +89,6 @@ samba-ad-dc2 drone.universe.local [fileserver] -coruscant.universe.local nfs-server.universe.local [glustertest] @@ -112,7 +109,6 @@ icinga_satellite mewimeet.de jitsi_fqdn=mewimeet.de [mailserver] -coruscant.universe.local mail.mewissen.site mailcow.universe.local mail.universe.local @@ -127,7 +123,6 @@ lifebook-u939.universe.local LIFEBOOK-U939 [nameserver] -coruscant.universe.local dnspri.universe.local dnssec1.universe.local dnssec2.universe.local @@ -143,10 +138,8 @@ endorvm.universe.local tuxedo-book-xp1511.universe.local [printspooler] -coruscant.universe.local [proxyserver] -coruscant.universe.local tinyproxy.universe.local [video_editing] diff --git a/roles/base/tasks/software/packages_utilities.yml b/roles/base/tasks/software/packages_utilities.yml index 5f3a6b7..c7bf214 100644 --- a/roles/base/tasks/software/packages_utilities.yml +++ b/roles/base/tasks/software/packages_utilities.yml @@ -76,4 +76,18 @@ - dnsutils - unattended-upgrades - "{{ python_passlib_package }}" - when: ansible_distribution in [ "Debian", "Ubuntu", "Linux Mint" ] + when: ansible_distribution in [ "Debian", "Ubuntu" ] + +- name: system setup | utilities | install utilities (linux mint) + tags: packages,system,system setup + package: + state: latest + name: + - bat + - sudo + - htop + - eza + - dnsutils + - unattended-upgrades + - "{{ python_passlib_package }}" + when: ansible_distribution in [ "Linux Mint" ] diff --git a/roles/base/tasks/system_setup/cron.yml b/roles/base/tasks/system_setup/cron.yml index 7c7622b..e90d04e 100644 --- a/roles/base/tasks/system_setup/cron.yml +++ b/roles/base/tasks/system_setup/cron.yml @@ -13,7 +13,7 @@ enabled: true when: ansible_distribution == "Archlinux" -- name: "add cronjob for ansible" +- name: add cronjob for ansible become: true become_user: root cron: @@ -24,6 +24,23 @@ minute: 0 hour: 1 +- name: correct crontab for reboot | remove + become: true + become_user: root + cron: + name: "generate SSH key on reboot, if missing" + job: '[[ -f /etc/ssh/ssh_host_* ]] | ssh-keygen -A' + state: absent + +- name: correct crontab for reboot | add + become: true + become_user: root + cron: + name: "generate SSH key on reboot, if missing" + job: '[[ -f /etc/ssh/ssh_host_* ]] || ssh-keygen -A' + state: present + special_time: reboot + # - name: system setup | cron | schedule automatic ansible provisioning # tags: cron # cron: @@ -59,4 +76,4 @@ hour: "0" minute: "0" job: "{{ root_home }} + '/bin/cron_pacman'" - when: ansible_distribution in ["Archlinux"] \ No newline at end of file + when: ansible_distribution in ["Archlinux"] diff --git a/roles/base/tasks/system_setup/hosts.yml b/roles/base/tasks/system_setup/hosts.yml index eaca382..3b814c7 100644 --- a/roles/base/tasks/system_setup/hosts.yml +++ b/roles/base/tasks/system_setup/hosts.yml @@ -6,7 +6,6 @@ owner: 'root' group: 'root' loop: - - { ip: '192.168.1.240', fqdn: 'coruscant.universe.local'} - { ip: '192.168.1.238', fqdn: 'gitea.mewissen.site'} when: - set_hosts is defined diff --git a/roles/mailserver/tasks/configure_postfix.yml b/roles/mailserver/tasks/configure_postfix.yml index 741f977..df85f0f 100644 --- a/roles/mailserver/tasks/configure_postfix.yml +++ b/roles/mailserver/tasks/configure_postfix.yml @@ -21,7 +21,7 @@ - {key: "maillog_file", value: "/var/log/postfix.log"} - {key: "message_size_limit", value: "0"} - {key: "milter_default_action", value: "accept"} - - {key: "mydestination", value: "'localhost, kashyyyk, coruscant, $myhostname'"} + - {key: "mydestination", value: "'localhost, kashyyyk, $myhostname'"} - {key: "myhostname", value: "{{ hostname | default(ansible_hostname) }}"} - {key: "mynetworks", value: "'{{ mynetworks }}'"} - {key: "mynetworks_style", value: "subnet"}