fix: ansible-lint
Some checks failed
Ansible Lint / build (push) Successful in 1m7s
Ansible Galaxy / deploy (push) Failing after 1m47s

This commit is contained in:
s3lph 2024-04-14 19:56:19 +02:00
parent 76a7cee507
commit 81576dc751
Signed by: s3lph
GPG key ID: 0AA29A52FB33CFB5
16 changed files with 38 additions and 26 deletions

8
.ansible-lint Normal file
View file

@ -0,0 +1,8 @@
---
skip_list:
- meta-runtime[unsupported-version]
- galaxy[no-changelog]
- galaxy[version-incorrect]
- name[casing]
- var-naming[no-role-prefix]

View file

@ -2,7 +2,7 @@
name: Ansible Galaxy name: Ansible Galaxy
on: on: # noqa yaml[truthy]
push: push:
tags: tags:
- 'v*' - 'v*'

View file

@ -1,7 +1,7 @@
--- ---
name: Ansible Lint name: Ansible Lint
on: [push, pull_request] on: [push, pull_request] # noqa yaml[truthy]
jobs: jobs:
build: build:
@ -15,4 +15,3 @@ jobs:
apt update; apt install --yes python3-pip apt update; apt install --yes python3-pip
pip3 install --break-system-packages ansible-lint pip3 install --break-system-packages ansible-lint
ansible-lint ansible-lint

View file

@ -31,6 +31,7 @@ license:
# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character # A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
# requirements as 'namespace' and 'name' # requirements as 'namespace' and 'name'
tags: tags:
- application
- nextcloud - nextcloud
- php - php
- keydb - keydb
@ -67,4 +68,3 @@ build_ignore: []
# 'omit_default_directives' is a boolean that controls whether the default directives are used. Mutually exclusive # 'omit_default_directives' is a boolean that controls whether the default directives are used. Mutually exclusive
# with 'build_ignore' # with 'build_ignore'
# manifest: null # manifest: null

View file

@ -1,7 +1,7 @@
--- ---
# Collections must specify a minimum required ansible version to upload # Collections must specify a minimum required ansible version to upload
# to galaxy # to galaxy
requires_ansible: '>=2.9.10' requires_ansible: '>=2.10'
# Content that Ansible needs to load from another location or that has # Content that Ansible needs to load from another location or that has
# been deprecated/removed # been deprecated/removed

View file

@ -1,6 +1,7 @@
--- ---
- hosts: all - name: Deploy the Nextcloud stack
hosts: all
roles: roles:
- s3lph.nextcloud.php - s3lph.nextcloud.php
- s3lph.nextcloud.keydb - s3lph.nextcloud.keydb

View file

@ -102,7 +102,6 @@ EXAMPLES = r'''
admin_user: admin admin_user: admin
admin_pass: changeme admin_pass: changeme
admin_email: admin@example.org admin_email: admin@example.org
''' '''

View file

@ -6,7 +6,7 @@
dest: /etc/keydb/keydb.conf dest: /etc/keydb/keydb.conf
owner: keydb owner: keydb
group: keydb group: keydb
mode: 0640 mode: "0640"
notify: notify:
- restart keydb - restart keydb

View file

@ -1,11 +1,13 @@
--- ---
- ansible.builtin.import_tasks: install.yml - name: Install KeyDB
ansible.builtin.import_tasks: install.yml
tags: tags:
- "role::keydb" - "role::keydb"
- "role::keydb:install" - "role::keydb:install"
- ansible.builtin.import_tasks: config.yml - name: Configure KeyDB
ansible.builtin.import_tasks: config.yml
tags: tags:
- "role::keydb" - "role::keydb"
- "role::keydb:config" - "role::keydb:config"

View file

@ -68,7 +68,7 @@
become_user: www-data become_user: www-data
s3lph.nextcloud.nextcloud_facts: s3lph.nextcloud.nextcloud_facts:
webroot: /var/lib/nextcloud/webroot webroot: /var/lib/nextcloud/webroot
when: nextcloud_register_installation.changed when: nextcloud_register_installation.changed # noqa no-handler
- name: Set common Nextcloud options - name: Set common Nextcloud options
become: true become: true

View file

@ -1,11 +1,13 @@
--- ---
- ansible.builtin.import_tasks: install.yml - name: Install Nextcloud
ansible.builtin.import_tasks: install.yml
tags: tags:
- "role::nextcloud" - "role::nextcloud"
- "role::nextcloud:install" - "role::nextcloud:install"
- ansible.builtin.import_tasks: config.yml - name: Configure Nextcloud
ansible.builtin.import_tasks: config.yml
tags: tags:
- "role::nextcloud" - "role::nextcloud"
- "role::nextcloud:config" - "role::nextcloud:config"

View file

@ -14,4 +14,3 @@ php_ini:
opcache.max_accelerated_files: "10000" opcache.max_accelerated_files: "10000"
opcache.revalidate_freq: "60" opcache.revalidate_freq: "60"
opcache.save_comments: "1" opcache.save_comments: "1"

View file

@ -6,7 +6,7 @@
dest: "/etc/php/{{ php_version }}/{{ item }}/conf.d/99-nextcloud.ini" dest: "/etc/php/{{ php_version }}/{{ item }}/conf.d/99-nextcloud.ini"
owner: root owner: root
group: root group: root
mode: 0644 mode: "0644"
loop: loop:
- fpm - fpm
- cli - cli
@ -22,7 +22,7 @@
- name: Enable wanted and disable unwanted php-fpm apache2 config - name: Enable wanted and disable unwanted php-fpm apache2 config
ansible.builtin.file: ansible.builtin.file:
path: "{{ item.path }}" path: "{{ item.path }}"
state: >- state: |
{%- if item.path.endswith(wanted) -%} {%- if item.path.endswith(wanted) -%}
link link
{%- else -%} {%- else -%}
@ -31,7 +31,7 @@
src: "/etc/apache2/conf-available{{ wanted }}" src: "/etc/apache2/conf-available{{ wanted }}"
owner: root owner: root
group: root group: root
mode: 0644 mode: "0644"
vars: vars:
wanted: "/php{{ php_version }}-fpm.conf" wanted: "/php{{ php_version }}-fpm.conf"
loop: "{{ php_register_conf_enabled.files }}" loop: "{{ php_register_conf_enabled.files }}"
@ -51,4 +51,4 @@
ansible.builtin.service: ansible.builtin.service:
name: "php{{ php_version }}-fpm.service" name: "php{{ php_version }}-fpm.service"
state: started state: started
enabled: yes enabled: true

View file

@ -1,11 +1,13 @@
--- ---
- ansible.builtin.import_tasks: install.yml - name: Install PHP
ansible.builtin.import_tasks: install.yml
tags: tags:
- "role::php" - "role::php"
- "role::php:install" - "role::php:install"
- ansible.builtin.import_tasks: config.yml - name: Configure PHP
ansible.builtin.import_tasks: config.yml
tags: tags:
- "role::php" - "role::php"
- "role::php:config" - "role::php:config"