From f689653d9eef2efb6972da35ac8890a88c7ad6e9 Mon Sep 17 00:00:00 2001 From: t2d Date: Fri, 31 Mar 2023 20:03:15 +0200 Subject: [PATCH] Fix Linting (#46) * Add requirements.yml in root * Add community.general to requirements * Add community.mysql to requirements * Name all import tasks * Capitalize all task names --- defaults/main.yml | 2 +- handlers/main.yml | 5 ++--- molecule/default/converge.yml | 2 -- molecule/default/prepare.yml | 7 +++---- molecule/default/requirements.yml | 1 - requirements.yml | 1 - tasks/main.yml | 2 +- 7 files changed, 7 insertions(+), 13 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 6c42fe3..b4af2d5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -31,7 +31,7 @@ userli_env_vars: - name: WKD_FORMAT value: "{{ userli_wkd_format }}" -userli_prometheus_textfile_collector_enabled: false +userli_prometheus_textfile_collector_enabled: False userli_prometheus_textfile_collector_path: "/var/lib/prometheus/node-exporter" userli_prometheus_textfile_collector_on_calendar: "*-*-* *:*:00" diff --git a/handlers/main.yml b/handlers/main.yml index 07aed5f..550a4b1 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,7 +1,6 @@ --- - name: Restart munin-node ansible.builtin.service: - service: name: munin-node state: restarted @@ -29,11 +28,11 @@ state: restarted - name: Reload systemd daemon - systemd: + ansible.builtin.systemd: daemon_reload: true - name: Restart userli-collector - service: + ansible.builtin.service: name: "{{ item }}" state: restarted loop: diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 6152d01..d2a349e 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -6,5 +6,3 @@ - systemli.userli vars: userli_mysql_password: userli - userli_munin: True - userli_prometheus_textfile_collector_enabled: True diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml index 1bc35ac..9ed4f46 100644 --- a/molecule/default/prepare.yml +++ b/molecule/default/prepare.yml @@ -4,13 +4,12 @@ become: true pre_tasks: - name: Run the equivalent of "apt-get update" before installing packages - apt: + ansible.builtin.apt: update_cache: yes - name: Install cron for testing in docker containers - apt: + ansible.builtin.apt: pkg: cron - update_cache: yes roles: - weareinteractive.apt - geerlingguy.apache @@ -25,7 +24,7 @@ extra_parameters: | SetEnv APP_ENV prod apt_packages: - - acl # support for unpriviledged become_user + - acl # support for unpriviledged become_user - unzip php_default_version_debian: "{% if ansible_distribution_release == 'bullseye' %}7.4{% else %}8.2{% endif %}" php_packages: diff --git a/molecule/default/requirements.yml b/molecule/default/requirements.yml index 198ca50..3960c2e 100644 --- a/molecule/default/requirements.yml +++ b/molecule/default/requirements.yml @@ -1,5 +1,4 @@ --- - roles: - name: weareinteractive.apt - name: geerlingguy.apache diff --git a/requirements.yml b/requirements.yml index 9cb8cca..d45f806 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,5 +1,4 @@ --- - collections: - community.general - community.mysql diff --git a/tasks/main.yml b/tasks/main.yml index 6f764f8..15895e1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -105,5 +105,5 @@ when: userli_munin | bool - name: Import metrics tasks - import_tasks: metrics.yml + ansible.builtin.import_tasks: metrics.yml when: userli_prometheus_textfile_collector_enabled | bool