Skip to content
Snippets Groups Projects
Commit 9d9f322d authored by Jörg Sachse's avatar Jörg Sachse
Browse files

chore: use FQCNs for all modules

parent 03675e63
No related branches found
No related tags found
No related merge requests found
---
- 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') }}"
......
---
- 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"
......
---
- 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 }}"
......
---
- name: Install/Update required Debian base packages
apt:
ansible.builtin.apt:
state: present
name: [
'logrotate',
......
......@@ -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"
......
......@@ -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]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment