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

[UPD] ansible-lint

parent b70f1064
Branches
Étiquettes v1.0.6
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 privatebin docker
docker_compose:
- name: Start privatebin docker
community.docker.docker_compose:
project_src: /home/docker/
files: privatebin.yaml
project_name: privatebin
......
---
galaxy_info:
author: Rémi
author: lefilament
description: Role for deploying Privatebin on 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:
......
......@@ -2,18 +2,18 @@
## Install privatebin docker
- name: Install privatebin docker
template:
ansible.builtin.template:
src: privatebin.yaml.j2
dest: /home/docker/privatebin.yaml
owner: root
group: root
mode: '0400'
notify:
- start privatebin docker
- Start privatebin docker
## Backup Privatebin section
- name: Install privatebin backup compose file
template:
ansible.builtin.template:
src: backup.yaml.j2
dest: /home/docker/backups/backup-privatebin.yaml
owner: root
......@@ -22,7 +22,7 @@
when: inventory_hostname in groups['maintenance_contract']
- name: Install privatebin backup2 compose file
template:
ansible.builtin.template:
src: backup2.yaml.j2
dest: /home/docker/backups/backup2-privatebin.yaml
owner: root
......@@ -30,17 +30,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 privatebin
minute: "25"
hour: "04"
job: /usr/bin/docker-compose -f /home/docker/backups/backup-privatebin.yaml run --rm backup_privatebin
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 privatebin
minute: "35"
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