From 9d9f322d49347126b07f2cfd7a8734c7ca4f9cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de> Date: Thu, 10 Nov 2022 11:52:32 +0100 Subject: [PATCH] chore: use FQCNs for all modules --- tasks/configure-nfs-mounts.yml | 8 ++++---- tasks/configure-systemd-services.yml | 4 ++-- tasks/create-users-groups.yml | 4 ++-- tasks/install-packages.yml | 2 +- tasks/install-repair-tools.yml | 18 +++++++++--------- tasks/main.yml | 10 +++++----- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tasks/configure-nfs-mounts.yml b/tasks/configure-nfs-mounts.yml index 4a30073..c838b9f 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 bb0ec47..ee8cdd4 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 f6b00ac..dd241d1 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 96a6ffa..a87bc92 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 f0e6779..2328f1c 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 0cf2859..98f4105 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] -- GitLab