From 0df76cefe611de766d3fb7441e0651161a255547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de> Date: Thu, 2 Mar 2023 12:14:27 +0100 Subject: [PATCH] style: satisfy linter --- .ansible-lint | 1 + meta/main.yml | 2 ++ molecule/resources/playbooks/prepare.yml | 4 ++-- site.yml | 5 +++-- tasks/configure_apache.yml | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index f18a647..5620f63 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -37,6 +37,7 @@ use_default_rules: true skip_list: - skip_this_tag - git-latest + - name[casing] # Any rule that has the 'opt-in' tag will not be loaded unless its 'id' is # mentioned in the enable_list: diff --git a/meta/main.yml b/meta/main.yml index ffcfaca..4e494b3 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,5 +1,7 @@ --- galaxy_info: + role_name: "ansible_lza_validators" + namespace: "slub" author: Jörg Sachse (<Joerg.Sachse@slub-dresden.de>) company: SLUB Dresden description: role to install validation server for the SLUBarchiv digital preservation repository diff --git a/molecule/resources/playbooks/prepare.yml b/molecule/resources/playbooks/prepare.yml index 3a60934..25f7ac8 100644 --- a/molecule/resources/playbooks/prepare.yml +++ b/molecule/resources/playbooks/prepare.yml @@ -9,6 +9,7 @@ become: true - name: configure additional package repositories for Debian + when: ansible_os_family == "Debian" block: - name: add 'contrib' repos to default Debian repos ansible.builtin.replace: @@ -34,9 +35,9 @@ update_cache: true mode: "0644" become: true - when: ansible_os_family == "Debian" - name: configure additional package repositories for RedHat + when: ansible_os_family == "RedHat" block: - name: add custom repositories ansible.builtin.yum_repository: @@ -58,4 +59,3 @@ ansible.builtin.file: path: "/etc/yum.repos.d/SLUB.repo" state: absent - when: ansible_os_family == "RedHat" diff --git a/site.yml b/site.yml index 7f71f79..ca7f5a1 100644 --- a/site.yml +++ b/site.yml @@ -1,8 +1,9 @@ --- -- hosts: "*" +- name: install validation server + hosts: "*" pre_tasks: - name: Verify that the installed version of Ansible meets this playbook's version requirements. - assert: + ansible.builtin.assert: that: "ansible_version.full is version_compare('2.8', '>=')" msg: > "You must update Ansible to at least 2.8 to use this playbook." diff --git a/tasks/configure_apache.yml b/tasks/configure_apache.yml index d5f20ab..8e45ef1 100644 --- a/tasks/configure_apache.yml +++ b/tasks/configure_apache.yml @@ -26,7 +26,7 @@ # symlink /etc/apache2/mods-available/cgi.load to /etc/apache2/mods-enabled/ - name: CGI-Extension-Modul aktivieren - apache2_module: + community.general.apache2_module: name: "cgid" notify: - restart apache -- GitLab