Skip to content

Commit

Permalink
Fix Linting (#46)
Browse files Browse the repository at this point in the history
* Add requirements.yml in root
* Add community.general to requirements
* Add community.mysql to requirements
* Name all import tasks
* Capitalize all task names
  • Loading branch information
t2d authored and 0x46616c6b committed Apr 7, 2024
1 parent a2a3f04 commit 1b8a5dd
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
5 changes: 2 additions & 3 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
- name: Restart munin-node
ansible.builtin.service:
service:
name: munin-node
state: restarted

Expand Down Expand Up @@ -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:
Expand Down
7 changes: 3 additions & 4 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
1 change: 0 additions & 1 deletion molecule/default/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

roles:
- name: weareinteractive.apt
- name: geerlingguy.apache
Expand Down
1 change: 0 additions & 1 deletion requirements.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

collections:
- community.general
- community.mysql
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1b8a5dd

Please sign in to comment.