fix: ansible-lint
This commit is contained in:
parent
76a7cee507
commit
81576dc751
16 changed files with 38 additions and 26 deletions
8
.ansible-lint
Normal file
8
.ansible-lint
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
|
||||
skip_list:
|
||||
- meta-runtime[unsupported-version]
|
||||
- galaxy[no-changelog]
|
||||
- galaxy[version-incorrect]
|
||||
- name[casing]
|
||||
- var-naming[no-role-prefix]
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
name: Ansible Galaxy
|
||||
|
||||
on:
|
||||
on: # noqa yaml[truthy]
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
|
||||
name: Ansible Lint
|
||||
on: [push, pull_request]
|
||||
on: [push, pull_request] # noqa yaml[truthy]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -15,4 +15,3 @@ jobs:
|
|||
apt update; apt install --yes python3-pip
|
||||
pip3 install --break-system-packages ansible-lint
|
||||
ansible-lint
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ readme: README.md
|
|||
# A list of the collection's content authors. Can be just the name or in the format 'Full Name <email> (url)
|
||||
# @nicks:irc/im.site#channel'
|
||||
authors:
|
||||
- s3lph <s3lph@kabelsalat.ch>
|
||||
- s3lph <s3lph@kabelsalat.ch>
|
||||
|
||||
|
||||
### OPTIONAL but strongly recommended
|
||||
|
@ -26,11 +26,12 @@ description: Install and configure Nextcloud and PHP-FPM.
|
|||
# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only
|
||||
# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file'
|
||||
license:
|
||||
- MIT
|
||||
- MIT
|
||||
|
||||
# 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'
|
||||
tags:
|
||||
- application
|
||||
- nextcloud
|
||||
- php
|
||||
- keydb
|
||||
|
@ -67,4 +68,3 @@ build_ignore: []
|
|||
# 'omit_default_directives' is a boolean that controls whether the default directives are used. Mutually exclusive
|
||||
# with 'build_ignore'
|
||||
# manifest: null
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
# Collections must specify a minimum required ansible version to upload
|
||||
# to galaxy
|
||||
requires_ansible: '>=2.9.10'
|
||||
requires_ansible: '>=2.10'
|
||||
|
||||
# Content that Ansible needs to load from another location or that has
|
||||
# been deprecated/removed
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
|
||||
- hosts: all
|
||||
- name: Deploy the Nextcloud stack
|
||||
hosts: all
|
||||
roles:
|
||||
- s3lph.nextcloud.php
|
||||
- s3lph.nextcloud.keydb
|
||||
|
|
|
@ -102,7 +102,6 @@ EXAMPLES = r'''
|
|||
admin_user: admin
|
||||
admin_pass: changeme
|
||||
admin_email: admin@example.org
|
||||
|
||||
'''
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
dest: /etc/keydb/keydb.conf
|
||||
owner: keydb
|
||||
group: keydb
|
||||
mode: 0640
|
||||
mode: "0640"
|
||||
notify:
|
||||
- restart keydb
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
---
|
||||
|
||||
- ansible.builtin.import_tasks: install.yml
|
||||
- name: Install KeyDB
|
||||
ansible.builtin.import_tasks: install.yml
|
||||
tags:
|
||||
- "role::keydb"
|
||||
- "role::keydb:install"
|
||||
|
||||
- ansible.builtin.import_tasks: config.yml
|
||||
- name: Configure KeyDB
|
||||
ansible.builtin.import_tasks: config.yml
|
||||
tags:
|
||||
- "role::keydb"
|
||||
- "role::keydb:config"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
- name: restart php-fpm
|
||||
ansible.builtin.service:
|
||||
name: "php{{ php_version}}-fpm.service"
|
||||
name: "php{{ php_version }}-fpm.service"
|
||||
state: restarted
|
||||
|
||||
- name: restart apache2
|
||||
|
|
|
@ -36,7 +36,7 @@ argument_specs:
|
|||
description: Port of the Redis server, or 0 if a UNIX socket is used.
|
||||
type: int
|
||||
default: 0
|
||||
nextcloud_redis_dbindex:
|
||||
nextcloud_redis_dbindex:
|
||||
description: Redis database index.
|
||||
type: int
|
||||
default: 0
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
- nextcloud_db_engine == 'mysql'
|
||||
- nextcloud_db_host == 'localhost'
|
||||
block:
|
||||
|
||||
|
||||
- name: Install MariaDB server
|
||||
ansible.builtin.apt:
|
||||
name: mariadb-server
|
||||
|
||||
|
||||
- name: Create MariaDB Database
|
||||
community.mysql.mysql_db:
|
||||
name: '{{ nextcloud_db_name }}'
|
||||
|
@ -68,7 +68,7 @@
|
|||
become_user: www-data
|
||||
s3lph.nextcloud.nextcloud_facts:
|
||||
webroot: /var/lib/nextcloud/webroot
|
||||
when: nextcloud_register_installation.changed
|
||||
when: nextcloud_register_installation.changed # noqa no-handler
|
||||
|
||||
- name: Set common Nextcloud options
|
||||
become: true
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
---
|
||||
|
||||
- ansible.builtin.import_tasks: install.yml
|
||||
- name: Install Nextcloud
|
||||
ansible.builtin.import_tasks: install.yml
|
||||
tags:
|
||||
- "role::nextcloud"
|
||||
- "role::nextcloud:install"
|
||||
|
||||
- ansible.builtin.import_tasks: config.yml
|
||||
- name: Configure Nextcloud
|
||||
ansible.builtin.import_tasks: config.yml
|
||||
tags:
|
||||
- "role::nextcloud"
|
||||
- "role::nextcloud:config"
|
||||
|
|
|
@ -14,4 +14,3 @@ php_ini:
|
|||
opcache.max_accelerated_files: "10000"
|
||||
opcache.revalidate_freq: "60"
|
||||
opcache.save_comments: "1"
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
dest: "/etc/php/{{ php_version }}/{{ item }}/conf.d/99-nextcloud.ini"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
loop:
|
||||
- fpm
|
||||
- cli
|
||||
|
@ -22,7 +22,7 @@
|
|||
- name: Enable wanted and disable unwanted php-fpm apache2 config
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: >-
|
||||
state: |
|
||||
{%- if item.path.endswith(wanted) -%}
|
||||
link
|
||||
{%- else -%}
|
||||
|
@ -31,7 +31,7 @@
|
|||
src: "/etc/apache2/conf-available{{ wanted }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
vars:
|
||||
wanted: "/php{{ php_version }}-fpm.conf"
|
||||
loop: "{{ php_register_conf_enabled.files }}"
|
||||
|
@ -51,4 +51,4 @@
|
|||
ansible.builtin.service:
|
||||
name: "php{{ php_version }}-fpm.service"
|
||||
state: started
|
||||
enabled: yes
|
||||
enabled: true
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
---
|
||||
|
||||
- ansible.builtin.import_tasks: install.yml
|
||||
- name: Install PHP
|
||||
ansible.builtin.import_tasks: install.yml
|
||||
tags:
|
||||
- "role::php"
|
||||
- "role::php:install"
|
||||
|
||||
- ansible.builtin.import_tasks: config.yml
|
||||
- name: Configure PHP
|
||||
ansible.builtin.import_tasks: config.yml
|
||||
tags:
|
||||
- "role::php"
|
||||
- "role::php:config"
|
||||
|
|
Loading…
Reference in a new issue