diff --git a/tasks/configure-nfs-mounts.yml b/tasks/configure-nfs-mounts.yml index 4a30073964739a69072e95f1aa6a3a34fff198ba..c838b9f2f23d497521996c1b899359c7d56466ba 100644 --- a/tasks/configure-nfs-mounts.yml +++ b/tasks/configure-nfs-mounts.yml @@ -1,19 +1,19 @@ --- - name: check if mountpoints exist - stat: + ansible.builtin.stat: path: "{{ item.name }}" loop: "{{ vault_nfs_mounts | flatten(levels=1) }}" register: missing_mountpoints tags: [ci] - name: show missing mountpoints - debug: + ansible.builtin.debug: # var: missing_mountpoints msg: "{{ item }}" loop: "{{ missing_mountpoints.results | flatten(levels=1) }}" - name: create missing mountpoints so Molecule tests don't fail - file: + ansible.builtin.file: path: "{{ item.item.name }}" owner: "{{ vault_nfs_owner }}" group: "{{ vault_nfs_group }}" @@ -24,7 +24,7 @@ tags: [ci] - name: NFS-Shares mounten - mount: + ansible.posix.mount: name: "{{ item.name }}" src: "{{ item.src }}" state: "{{ item.state | default('mounted') }}" diff --git a/tasks/configure-systemd-services.yml b/tasks/configure-systemd-services.yml index bb0ec472239af97cacc75ac93e3e244f850a8194..ee8cdd4413c9fa2c960e1bcd73e2d998e6ae6b7c 100644 --- a/tasks/configure-systemd-services.yml +++ b/tasks/configure-systemd-services.yml @@ -1,12 +1,12 @@ --- - name: Verzeichnis für Unitfiles erstellen - file: + ansible.builtin.file: path: "/etc/systemd/user/" state: directory mode: "755" - name: Systemd-Unitfiles installieren - template: + ansible.builtin.template: src: "etc/systemd/user/{{ item.key }}.service.j2" dest: "/etc/systemd/user/{{ item.key }}.service" owner: "root" diff --git a/tasks/create-users-groups.yml b/tasks/create-users-groups.yml index f6b00ac6c82b2e8ebb98d14ed8d27d4af6ce9f4e..dd241d1271525a91f977b144e29bb494b36a8d45 100644 --- a/tasks/create-users-groups.yml +++ b/tasks/create-users-groups.yml @@ -1,12 +1,12 @@ --- - name: Gruppe exlibris erstellen - group: + ansible.builtin.group: name: "{{ item.name }}" gid: "{{ item.gid }}" loop: "{{ vault_groups | flatten(levels=1) }}" - name: User in Gruppen einfügen und primäre Gruppe setzen - user: + ansible.builtin.user: name: "{{ item.name }}" group: "{{ item.group }}" groups: "{{ item.groups }}" diff --git a/tasks/install-packages.yml b/tasks/install-packages.yml index 96a6ffa4dace3bbc1c669693fc56f5edf36b444b..a87bc927c2e65a2cabf9059d5c18c20a90273218 100644 --- a/tasks/install-packages.yml +++ b/tasks/install-packages.yml @@ -1,6 +1,6 @@ --- - name: Install/Update required Debian base packages - apt: + ansible.builtin.apt: state: present name: [ 'logrotate', diff --git a/tasks/install-repair-tools.yml b/tasks/install-repair-tools.yml index f0e67794b7790a5ae260e688de4b253eb201ea58..2328f1c6602d552e57bcbda255a2fffc71a99aa4 100644 --- a/tasks/install-repair-tools.yml +++ b/tasks/install-repair-tools.yml @@ -2,13 +2,13 @@ - name: configure Debian repositories block: - name: öffentlichen Schlüssel hinzufügen (sonst muss bei jeder Installation eine Warnmeldung bestätigt werden) - apt_key: + ansible.builtin.apt_key: url: "{{ vault_debrepo_url }}deb-repository/pub.gpg.key" state: present when: ansible_distribution_major_version == '11' tags: [apt, aptkey] - name: SLUB-lokales Debian-Repository für Installation der SubApp in /etc/apt/sources.list.d/ eintragen - apt_repository: + ansible.builtin.apt_repository: repo: "deb {{ vault_debrepo_url }}deb-repository bullseye main" state: present update_cache: "yes" @@ -18,7 +18,7 @@ when: "ansible_facts['distribution'] == 'Debian'" - name: cleanup legacy tools - file: + ansible.builtin.file: path: "{{ item }}" state: absent loop: @@ -29,7 +29,7 @@ notify: restart repairtools - name: install repairtool (package dependencies are encoded in the package) - apt: + ansible.builtin.apt: name: [ '{{ item.package_name }}={{ item.version }}', ] @@ -41,7 +41,7 @@ tags: [apt] - name: configure tool version pinning to avoid automatic nightly upgrades - template: + ansible.builtin.template: src: "etc/apt/preferences.d/pinning.j2" dest: "/etc/apt/preferences.d/{{ item.package_name }}" owner: "root" @@ -57,7 +57,7 @@ patterns: '*.cfg' register: cit_configs - name: install checkit_tiff config - copy: + ansible.builtin.copy: src: "{{ item.path }}" dest: "/usr/local/etc/" remote_src: true @@ -65,7 +65,7 @@ loop: "{{ cit_configs.files }}" - name: create caching directory - file: + ansible.builtin.file: state: directory path: "{{ item }}" owner: "{{ vault_service_user }}" @@ -77,13 +77,13 @@ - "/home/{{ vault_service_user }}/.config/repair/cfg/" - name: Symlinks zu Binaries und Configs für checkit_tiff und fixit_tiff erstellen - file: + ansible.builtin.file: state: link src: "{{ item.src }}" dest: "{{ item.dest }}" owner: "{{ vault_service_user }}" group: "{{ vault_service_user }}" - with_items: + loop: - src: "/usr/bin/checkit_tiff_strict" dest: "/home/{{ vault_service_user }}/.config/repair/bin/checkit_tiff" - src: "/usr/bin/fixit_tiff" diff --git a/tasks/main.yml b/tasks/main.yml index 0cf285965ecefe5f043048ecfcd11595b4baeda5..98f41050b42f310426709686d06fc62e98f39733 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -10,22 +10,22 @@ ### PAKETINSTALLATIONEN ### - name: install packages - import_tasks: install-packages.yml + ansible.builtin.import_tasks: "install-packages.yml" tags: [apt, ci] ### USER IN GRUPPEN EINFUEGEN ### - name: create users and groups - import_tasks: create-users-groups.yml + ansible.builtin.import_tasks: "create-users-groups.yml" tags: [users, ci] ### MOUNTPOINTS ANLEGEN, EINTRAGEN & MOUNTEN ### - name: configure nfs mounts - import_tasks: configure-nfs-mounts.yml + ansible.builtin.import_tasks: "configure-nfs-mounts.yml" tags: [nfs] ### INSTALLATION REPARATURTOOLS ### - name: install repairtools - import_tasks: install-repair-tools.yml + ansible.builtin.import_tasks: "install-repair-tools.yml" tags: [repairtools, ci] - name: install validation tools @@ -34,5 +34,5 @@ ### INSTALLATION SYSTEMD SERVICES - name: install SystemD-Services - import_tasks: configure-systemd-services.yml + ansible.builtin.import_tasks: "configure-systemd-services.yml" tags: [systemd]