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
|
name: Ansible Galaxy
|
||||||
|
|
||||||
on:
|
on: # noqa yaml[truthy]
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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)
|
# 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'
|
# @nicks:irc/im.site#channel'
|
||||||
authors:
|
authors:
|
||||||
- s3lph <s3lph@kabelsalat.ch>
|
- s3lph <s3lph@kabelsalat.ch>
|
||||||
|
|
||||||
|
|
||||||
### OPTIONAL but strongly recommended
|
### 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
|
# 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'
|
# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file'
|
||||||
license:
|
license:
|
||||||
- MIT
|
- MIT
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
- name: restart php-fpm
|
- name: restart php-fpm
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: "php{{ php_version}}-fpm.service"
|
name: "php{{ php_version }}-fpm.service"
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: restart apache2
|
- name: restart apache2
|
||||||
|
|
|
@ -36,7 +36,7 @@ argument_specs:
|
||||||
description: Port of the Redis server, or 0 if a UNIX socket is used.
|
description: Port of the Redis server, or 0 if a UNIX socket is used.
|
||||||
type: int
|
type: int
|
||||||
default: 0
|
default: 0
|
||||||
nextcloud_redis_dbindex:
|
nextcloud_redis_dbindex:
|
||||||
description: Redis database index.
|
description: Redis database index.
|
||||||
type: int
|
type: int
|
||||||
default: 0
|
default: 0
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
- nextcloud_db_engine == 'mysql'
|
- nextcloud_db_engine == 'mysql'
|
||||||
- nextcloud_db_host == 'localhost'
|
- nextcloud_db_host == 'localhost'
|
||||||
block:
|
block:
|
||||||
|
|
||||||
- name: Install MariaDB server
|
- name: Install MariaDB server
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: mariadb-server
|
name: mariadb-server
|
||||||
|
|
||||||
- name: Create MariaDB Database
|
- name: Create MariaDB Database
|
||||||
community.mysql.mysql_db:
|
community.mysql.mysql_db:
|
||||||
name: '{{ nextcloud_db_name }}'
|
name: '{{ nextcloud_db_name }}'
|
||||||
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue