Skip to content
Extraits de code Groupes Projets
Valider 631acc10 rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

[UPD] ansible-lint

parent 64afaf2c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
---
warn_list: # or 'skip_list' to silence them completely
- git-latest # Git checkouts must contain explicit version
- ignore-errors # Use failed_when and specify error conditions instead of using ignore_errors
- no-changed-when # Commands should not change things if nothing needs doing
- no-handler # Tasks that run when changed should likely be handlers
- package-latest # Package installs should not use latest
---
# Based on ansible-lint config
extends: default
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
colons:
max-spaces-after: -1
level: error
commas:
max-spaces-after: -1
level: error
# comments enable
comments: enable
comments-indentation: enable
document-start: enable
empty-lines:
max: 3
level: error
hyphens:
level: error
indentation:
level: warning
indent-sequences: consistent
spaces: 4
check-multi-line-strings: true
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: enable
new-lines:
type: unix
# trailing-spaces enable
trailing-spaces: enable
truthy: enable
---
- name: start etherpad docker
docker_compose:
- name: Start etherpad docker
community.docker.docker_compose:
project_src: /home/docker/etherpad
async: 120
poll: 10
......
---
galaxy_info:
author: Rémi
author: lefilament
description: Role for deploying Etherpad with Docker
company: Le Filament (https://le-filament.com)
license: AGPL-3.0-or-later
min_ansible_version: 2.1
min_ansible_version: "2.1"
platforms:
- name: Ubuntu
versions:
......
---
- name: create Etherpad docker structure on server in /home/docker/etherpad
file:
- name: Create Etherpad docker structure on server in /home/docker/etherpad
ansible.builtin.file:
name: /home/docker/etherpad
state: directory
owner: root
......@@ -9,8 +9,8 @@
mode: '0755'
## Install Etherpad docker
- name: copy Dockerfile
copy:
- name: Copy Dockerfile
ansible.builtin.copy:
src: Dockerfile
dest: /home/docker/etherpad/Dockerfile
owner: root
......@@ -18,18 +18,18 @@
mode: '0644'
- name: Install etherpad docker
template:
ansible.builtin.template:
src: etherpad.yaml.j2
dest: /home/docker/etherpad/docker-compose.yaml
owner: root
group: root
mode: '0400'
notify:
- start etherpad docker
- Start etherpad docker
## Backup Etherpad section
- name: Install Etherpad backup compose file
template:
ansible.builtin.template:
src: backup.yaml.j2
dest: /home/docker/backups/backup-etherpad.yaml
owner: root
......@@ -38,7 +38,7 @@
when: inventory_hostname in groups['maintenance_contract']
- name: Install Etherpad backup2 compose file
template:
ansible.builtin.template:
src: backup2.yaml.j2
dest: /home/docker/backups/backup2-etherpad.yaml
owner: root
......@@ -46,17 +46,16 @@
mode: '0400'
when: inventory_hostname in groups['maintenance_contract']
- name: add cron job to run backup every day
cron:
- name: Add cron job to run backup every day
ansible.builtin.cron:
name: backup etherpad
minute: "50"
hour: "03"
job: /usr/bin/docker-compose -f /home/docker/backups/backup-etherpad.yaml run --rm backup_etherpad
when: inventory_hostname in groups['maintenance_contract']
- name: add cron job to run backup2 every day
cron:
- name: Add cron job to run backup2 every day
ansible.builtin.cron:
name: backup2 etherpad
minute: "00"
hour: "01"
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter