BREAKING CHANGE: applied autofixes with ansible lint

This commit is contained in:
Janik von Rotz committed 2024-04-05 16:04:24 +02:00
1 parent e9d81f19c6
commit 2c4f5be2d5
452 files changed
+2794 -2385

No files matched your search

+11 -2
View File
@@ -1,3 +1,12 @@
skip_list:
- experimental # all rules tagged as experimental
- role-name # Role name {0} does not match ``^[a-z][a-z0-9_]+$`` pattern
- outdated-tag
- role-name
- "fqcn[action-core]"
- line-length
- yaml[line-length]
- "name[template]"
- risky-file-permissions
- "jinja[spacing]"
- ignore-errors
- no-changed-when
- var-naming[no-role-prefix]
+4 -3
View File
@@ -1,6 +1,7 @@
---
- hosts: all
become: true
roles:
- role: clean
tags:
- always
- role: clean
tags:
- always
+19 -18
View File
@@ -1,22 +1,23 @@
---
- hosts: localhost
become: true
connection: local
roles:
- role: odoo_scripts
tags: odoo_scripts
- role: odoo_apps
tags: odoo_apps
- role: docker_compose
tags: docker_compose
- role: clean
tags: clean
- role: package
tags: package
- role: cargo
tags: cargo
- role: innernet_client
tags: innernet_client
- role: maintenance
tags: maintenance
- role: rabbitmq
tags: rabbitmq
- role: odoo_scripts
tags: odoo_scripts
- role: odoo_apps
tags: odoo_apps
- role: docker_compose
tags: docker_compose
- role: clean
tags: clean
- role: package
tags: package
- role: cargo
tags: cargo
- role: innernet_client
tags: innernet_client
- role: maintenance
tags: maintenance
- role: rabbitmq
tags: rabbitmq
+15 -14
View File
@@ -1,17 +1,18 @@
---
- hosts: all
become: true
roles:
- role: redis
tags: redis
- role: nextcloud
tags: nextcloud
- role: nextcloud_apps
tags: nextcloud_apps
- role: onlyoffice_documentserver
tags: onlyoffice_documentserver
- role: nextcloud_exporter
tags: nextcloud_exporter
- role: elasticsearch
tags: elasticsearch
- role: collabora_code
tags: collabora_code
- role: redis
tags: redis
- role: nextcloud
tags: nextcloud
- role: nextcloud_apps
tags: nextcloud_apps
- role: onlyoffice_documentserver
tags: onlyoffice_documentserver
- role: nextcloud_exporter
tags: nextcloud_exporter
- role: elasticsearch
tags: elasticsearch
- role: collabora_code
tags: collabora_code
+1
View File
@@ -1,3 +1,4 @@
---
- hosts: all
become: true
roles:
+31 -30
View File
@@ -1,33 +1,34 @@
---
- hosts: all
become: true
roles:
- role: cadvisor
tags: cadvisor
- role: node_exporter
tags: node_exporter
- role: restic_server
tags: restic_server
- role: bigbluebutton_exporter
tags: bigbluebutton_exporter
- role: grafana
tags: grafana
- role: postgres_exporter
tags: postgres_exporter
- role: blackbox_exporter
tags: blackbox_exporter
- role: prometheus
tags: prometheus
- role: loki
tags: loki
- role: promtail
tags: promtail
- role: nginx
tags: nginx
- role: nginx_waf
tags: nginx_waf
- role: simple_mail_forwarder
tags: simple_mail_forwarder
- role: keycloak_client
tags: keycloak_client
- role: htpasswd
tags: htpasswd
- role: cadvisor
tags: cadvisor
- role: node_exporter
tags: node_exporter
- role: restic_server
tags: restic_server
- role: bigbluebutton_exporter
tags: bigbluebutton_exporter
- role: grafana
tags: grafana
- role: postgres_exporter
tags: postgres_exporter
- role: blackbox_exporter
tags: blackbox_exporter
- role: prometheus
tags: prometheus
- role: loki
tags: loki
- role: promtail
tags: promtail
- role: nginx
tags: nginx
- role: nginx_waf
tags: nginx_waf
- role: simple_mail_forwarder
tags: simple_mail_forwarder
- role: keycloak_client
tags: keycloak_client
- role: htpasswd
tags: htpasswd
+113 -112
View File
@@ -1,115 +1,116 @@
---
- hosts: all
become: true
roles:
- role: resolv
tags: resolv
- role: package
tags: package
- role: cargo
tags: cargo
- role: docker_swarm
tags: docker_swarm
- role: fstab
tags: fstab
- role: locale
tags: locale
- role: iam
tags: iam
- role: update
tags:
- update
- never
- role: maintenance
tags: maintenance
- role: ufw
tags: ufw
- role: fail2ban
tags: fail2ban
- role: restic_server
tags: restic_server
- role: restic_client
tags: restic_client
- role: s3cmd
tags: s3cmd
- role: docker_compose
tags: docker_compose
- role: innernet_server
tags: innernet_server
- role: innernet_client
tags: innernet_client
- role: systemd
tags: systemd
- role: rclone
tags: rclone
- role: cron
tags: cron
- role: docker_hosts
tags: docker_hosts
- role: jenkins
tags: jenkins
- role: dind
tags: dind
- role: debug
tags: debug
- role: postgres
tags: postgres
- role: mysql
tags: mysql
- role: bookstack
tags: bookstack
- role: nextcloud
tags: nextcloud
- role: matomo
tags: matomo
- role: fathom
tags: fathom
- role: keycloak
tags: keycloak
- role: wordpress
tags: wordpress
- role: pgadmin
tags: pgadmin
- role: moodle
tags: moodle
- role: vercel
tags: vercel
- role: synapse
tags: synapse
- role: birt
tags: birt
- role: gitea
tags: gitea
- role: remark42
tags: remark42
- role: mailhog
tags: mailhog
- role: dozzle
tags: dozzle
- role: superset
tags: superset
- role: simple_mail_forwarder
tags: simple_mail_forwarder
- role: postfix
tags: postfix
- role: dribdat
tags: dribdat
- role: keycloak
tags: keycloak
- role: pgadmin
tags: pgadmin
- role: bigbluebutton
tags: # FIXME Filtering by tag does not work
- ubuntu1804
- ubuntu1604
- greenlight
- letsencrypt
- role: coturn
tags: coturn
- role: git
tags: git
- role: docker_network
tags: docker_network
- role: docker_hosts
tags: docker_hosts
- role: php_fpm
tags: php_fpm
- role: resolv
tags: resolv
- role: package
tags: package
- role: cargo
tags: cargo
- role: docker_swarm
tags: docker_swarm
- role: fstab
tags: fstab
- role: locale
tags: locale
- role: iam
tags: iam
- role: update
tags:
- update
- never
- role: maintenance
tags: maintenance
- role: ufw
tags: ufw
- role: fail2ban
tags: fail2ban
- role: restic_server
tags: restic_server
- role: restic_client
tags: restic_client
- role: s3cmd
tags: s3cmd
- role: docker_compose
tags: docker_compose
- role: innernet_server
tags: innernet_server
- role: innernet_client
tags: innernet_client
- role: systemd
tags: systemd
- role: rclone
tags: rclone
- role: cron
tags: cron
- role: docker_hosts
tags: docker_hosts
- role: jenkins
tags: jenkins
- role: dind
tags: dind
- role: debug
tags: debug
- role: postgres
tags: postgres
- role: mysql
tags: mysql
- role: bookstack
tags: bookstack
- role: nextcloud
tags: nextcloud
- role: matomo
tags: matomo
- role: fathom
tags: fathom
- role: keycloak
tags: keycloak
- role: wordpress
tags: wordpress
- role: pgadmin
tags: pgadmin
- role: moodle
tags: moodle
- role: vercel
tags: vercel
- role: synapse
tags: synapse
- role: birt
tags: birt
- role: gitea
tags: gitea
- role: remark42
tags: remark42
- role: mailhog
tags: mailhog
- role: dozzle
tags: dozzle
- role: superset
tags: superset
- role: simple_mail_forwarder
tags: simple_mail_forwarder
- role: postfix
tags: postfix
- role: dribdat
tags: dribdat
- role: keycloak
tags: keycloak
- role: pgadmin
tags: pgadmin
- role: bigbluebutton
tags: # FIXME Filtering by tag does not work
- ubuntu1804
- ubuntu1604
- greenlight
- letsencrypt
- role: coturn
tags: coturn
- role: git
tags: git
- role: docker_network
tags: docker_network
- role: docker_hosts
tags: docker_hosts
- role: php_fpm
tags: php_fpm
+2 -1
View File
@@ -1,3 +1,4 @@
---
greenlight_port: 127.0.0.1:5000
greenlight_description: Greenlight
greenlight_safe_hosts: "{{ bigbluebutton_hostname }}"
@@ -6,4 +7,4 @@ greenlight_db_port: "5432"
greenlight_default_registration: open
greenlight_allow_greenlight_accounts: "true"
greenlight_room_features: mute-on-join,require-moderator-approval,anyone-can-start,all-join-moderator
greenlight_allow_mail_notifications: "true"
greenlight_allow_mail_notifications: "true"
+5 -4
View File
@@ -1,14 +1,15 @@
---
- name: Restart BigBlueButton services
command: bbb-conf --restart
ansible.builtin.command: bbb-conf --restart
notify: Check BigBlueButton services
- name: Check BigBlueButton services
command: bbb-conf --status | grep inactive
ansible.builtin.command: bbb-conf --status | grep inactive
register: bigbluebutton_status
failed_when: bigbluebutton_status.rc != 0
changed_when: false
- name: Restart Nginx service
service:
ansible.builtin.service:
name: nginx
state: restarted
state: restarted
+1
View File
@@ -1,3 +1,4 @@
---
dependencies: # noqa 701
- role: postgres
tags:
@@ -1,7 +1,8 @@
---
# https://github.com/bigbluebutton/bbb-install/blob/5575cd87afc2b24b48d0ad26f18d2c542003fffe/bbb-install.sh#L988
- name: Copy bigbluebutton turn stun servers conf
template:
ansible.builtin.template:
src: turn-stun-servers.xml
dest: /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml
notify: Restart BigBlueButton services
notify: Restart BigBlueButton services
@@ -1,12 +1,13 @@
---
# https://github.com/bigbluebutton/bbb-install/blob/5575cd87afc2b24b48d0ad26f18d2c542003fffe/bbb-install.sh#L717
- name: Get BigBlueButton API secret # noqa 306
shell: "bbb-conf --secret | grep 'Secret: ' | sed 's/^ *Secret:\\s//g'"
ansible.builtin.shell: "bbb-conf --secret | grep 'Secret: ' | sed 's/^ *Secret:\\s//g'"
register: bigbluebutton_api_secret
changed_when: false
- name: "Start greenlight container {{ greenlight_hostname }}"
docker_container:
- name: Start greenlight container {{ greenlight_hostname }}
community.docker.docker_container:
name: "{{ greenlight_hostname }}"
labels:
description: "{{ greenlight_description }}"
@@ -47,18 +48,18 @@
register: start_greenlight_contaner
- name: Copy greenlight nginx conf
copy:
ansible.builtin.copy:
src: greenlight.nginx
dest: /etc/bigbluebutton/nginx/greenlight.nginx
notify: Restart BigBlueButton services
- name: Wait for greenlight container # noqa 503
pause:
ansible.builtin.pause:
seconds: "5"
when: start_greenlight_contaner.changed
- name: Create greenlight admin user
command: docker exec "{{ greenlight_hostname }}" \
bundle exec rake user:create["admin","{{ greenlight_admin_email }}","{{ greenlight_admin_password }}","admin"]
ansible.builtin.command: docker exec "{{ greenlight_hostname }}" \ bundle exec rake user:create["admin","{{ greenlight_admin_email }}","{{ greenlight_admin_password
}}","admin"]
register: greenlight_admin
changed_when: "'Account with that email already exists' not in greenlight_admin.stdout"
@@ -1,22 +1,23 @@
---
# https://github.com/bigbluebutton/bbb-install/blob/5575cd87afc2b24b48d0ad26f18d2c542003fffe/bbb-install.sh#L699
- name: Make the HTML5 client default for attendees join
replace:
path: "/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties"
regexp: 'attendeesJoinViaHTML5Client=false'
replace: 'attendeesJoinViaHTML5Client=true'
ansible.builtin.replace:
path: /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
regexp: attendeesJoinViaHTML5Client=false
replace: attendeesJoinViaHTML5Client=true
backup: true
- name: Make the HTML5 client default for moderators join
replace:
path: "/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties"
regexp: 'moderatorsJoinViaHTML5Client=false'
replace: 'moderatorsJoinViaHTML5Client=true'
ansible.builtin.replace:
path: /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
regexp: moderatorsJoinViaHTML5Client=false
replace: moderatorsJoinViaHTML5Client=true
backup: true
- name: Disable swf slides
replace:
path: "/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties"
regexp: 'swfSlidesRequired=true'
replace: 'swfSlidesRequired=false'
backup: true
ansible.builtin.replace:
path: /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
regexp: swfSlidesRequired=true
replace: swfSlidesRequired=false
backup: true
@@ -1,35 +1,36 @@
---
# https://github.com/bigbluebutton/bbb-install/blob/5575cd87afc2b24b48d0ad26f18d2c542003fffe/bbb-install.sh#L875
- name: Copy bigbluebutton nginx conf
template:
ansible.builtin.template:
src: bigbluebutton.nginx
dest: /etc/nginx/sites-available/bigbluebutton
notify: Restart Nginx service
- name: Update http for https on BigBlueButton webapp
replace:
path: "/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties"
regexp: 'bigbluebutton.web.serverURL=http:'
replace: 'bigbluebutton.web.serverURL=https:'
ansible.builtin.replace:
path: /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
regexp: "bigbluebutton.web.serverURL=http:"
replace: "bigbluebutton.web.serverURL=https:"
notify: Restart BigBlueButton services
- name: Update ws for wss on kurento media server
replace:
ansible.builtin.replace:
path: /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml
regexp: 'ws://'
replace: 'wss://'
regexp: ws://
replace: wss://
notify: Restart BigBlueButton services
- name: Update http for https on kurento media server
replace:
ansible.builtin.replace:
path: /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml
regexp: 'http://'
replace: 'https://'
regexp: http://
replace: https://
notify: Restart BigBlueButton services
- name: Update http for https on BigBlueButton client config
replace:
ansible.builtin.replace:
path: /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
regexp: 'playback_protocol: http$'
replace: 'playback_protocol: https'
regexp: "playback_protocol: http$"
replace: "playback_protocol: https"
notify: Restart BigBlueButton services
@@ -1,34 +1,36 @@
---
# https://github.com/bigbluebutton/bbb-install/blob/5575cd87afc2b24b48d0ad26f18d2c542003fffe/bbb-install.sh#L817
- name: Create nginx SSL certificates directory
file:
ansible.builtin.file:
state: directory
path: /etc/nginx/ssl
owner: root
group: root
- name: Create dhparam SSL file
command: openssl dhparam -dsaparam -out /etc/nginx/ssl/dhp-4096.pem 4096
ansible.builtin.command: openssl dhparam -dsaparam -out /etc/nginx/ssl/dhp-4096.pem 4096
args:
creates: /etc/nginx/ssl/dhp-4096.pem
- name: Create letsencrypt certificates with certbot
command: "certbot --webroot --email {{ bigbluebutton_certbot_email }} --agree-tos -w /var/www/bigbluebutton-default/ -d {{ bigbluebutton_hostname }} certonly"
ansible.builtin.command: certbot --webroot --email {{ bigbluebutton_certbot_email }} --agree-tos -w /var/www/bigbluebutton-default/ -d {{ bigbluebutton_hostname
}} certonly
args:
creates: "/etc/letsencrypt/live/{{ bigbluebutton_hostname }}/fullchain.pem"
creates: /etc/letsencrypt/live/{{ bigbluebutton_hostname }}/fullchain.pem
- name: Cron job to renew letsencrypt certficiates
cron:
name: "Renew letsencrypt certificates"
ansible.builtin.cron:
name: Renew letsencrypt certificates
minute: "30"
hour: "2"
weekday: "1"
job: 'certbot renew --standalone --pre-hook "service nginx stop" --post-hook "service nginx start" >> /var/log/le-renew.log'
job: certbot renew --standalone --pre-hook "service nginx stop" --post-hook "service nginx start" >> /var/log/le-renew.log
- name: Cron job to restart nginx
cron:
name: "Restart nginx"
ansible.builtin.cron:
name: Restart nginx
minute: "35"
hour: "2"
weekday: "1"
job: "/bin/systemctl reload nginx"
job: /bin/systemctl reload nginx
@@ -1,86 +1,86 @@
---
# https://docs.bigbluebutton.org/2.3/install.html#install
- name: Gather package facts
package_facts:
ansible.builtin.package_facts:
manager: auto
- name: Run inital installation with script as root
fail:
msg: "wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh |
bash -s -- -v bionic-230 -s {{ bigbluebutton_hostname }} -e {{ bigbluebutton_certbot_email }} -a -w"
ansible.builtin.fail:
msg: wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v bionic-230 -s {{ bigbluebutton_hostname }} -e {{ bigbluebutton_certbot_email }} -a
-w
when: "'bigbluebutton' not in ansible_facts.packages"
# https://github.com/bigbluebutton/bbb-install/blob/5575cd87afc2b24b48d0ad26f18d2c542003fffe/bbb-install.sh#L267
- name: Update locale (ensure LANG=en_US.UTF-8)
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/default/locale
regexp: ^LANG
line: 'LANG=en_US.UTF-8'
line: LANG=en_US.UTF-8
- name: Check multiverse apt repositories are present
apt_repository:
ansible.builtin.apt_repository:
repo: "{{ item }}"
state: present
loop:
- "deb http://archive.ubuntu.com/ubuntu bionic multiverse"
- "deb http://archive.ubuntu.com/ubuntu bionic-security multiverse"
- "deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse"
- "deb http://archive.ubuntu.com/ubuntu bionic universe"
- "deb http://archive.ubuntu.com/ubuntu bionic-security universe"
- "deb http://archive.ubuntu.com/ubuntu bionic-updates universe"
- deb http://archive.ubuntu.com/ubuntu bionic multiverse
- deb http://archive.ubuntu.com/ubuntu bionic-security multiverse
- deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse
- deb http://archive.ubuntu.com/ubuntu bionic universe
- deb http://archive.ubuntu.com/ubuntu bionic-security universe
- deb http://archive.ubuntu.com/ubuntu bionic-updates universe
- name: Check supplemental PPA repos are present
apt_repository:
ansible.builtin.apt_repository:
repo: "{{ item }}"
state: present
loop:
- 'ppa:bigbluebutton/support'
- 'ppa:rmescandon/yq'
- 'ppa:libreoffice/ppa'
- ppa:bigbluebutton/support
- ppa:rmescandon/yq
- ppa:libreoffice/ppa
- name: Add Nodesource apt key
apt_key:
ansible.builtin.apt_key:
url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
id: "68576280"
state: present
- name: Check Nodesource repo is present
apt_repository:
repo: "deb https://deb.nodesource.com/node_12.x {{ ansible_distribution_release }} main"
ansible.builtin.apt_repository:
repo: deb https://deb.nodesource.com/node_12.x {{ ansible_distribution_release }} main
state: present
- name: Add MongoDB apt key
apt_key:
url: "https://www.mongodb.org/static/pgp/server-4.2.asc"
ansible.builtin.apt_key:
url: https://www.mongodb.org/static/pgp/server-4.2.asc
state: present
- name: Check MongoDB repo is present
apt_repository:
repo: "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse"
ansible.builtin.apt_repository:
repo: deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse
state: present
- name: Add BigBlueButton apt key
apt_key:
ansible.builtin.apt_key:
url: https://ubuntu.bigbluebutton.org/repo/bigbluebutton.asc
state: present
- name: Check BigBlueButton repo is present
apt_repository:
repo: "deb {{ bigbluebutton_apt_repo_url }} bigbluebutton-bionic main"
ansible.builtin.apt_repository:
repo: deb {{ bigbluebutton_apt_repo_url }} bigbluebutton-bionic main
state: present
register: bigbluebutton_repo_is_present
- name: Update apt-get repo and cache # noqa 503
apt:
ansible.builtin.apt:
update_cache: true
force_apt_get: true
cache_valid_time: 3600
when: bigbluebutton_repo_is_present.changed
- name: Install dependencies
apt:
ansible.builtin.apt:
name:
- nodejs
- mongodb-org
@@ -93,24 +93,24 @@
state: present
- name: Install bigbluebutton
apt:
ansible.builtin.apt:
name:
- bigbluebutton
state: present
- name: Install bbb-html5
apt:
ansible.builtin.apt:
name:
- bbb-html5
state: present
- name: Get BigBlueButton API url # noqa 306
shell: "bbb-conf --secret | grep {{ bigbluebutton_hostname }}"
ansible.builtin.shell: bbb-conf --secret | grep {{ bigbluebutton_hostname }}
register: bigbluebutton_api_status
ignore_errors: true
changed_when: false
- name: Set BigBlueButton server name
command: bbb-conf --setip "{{ bigbluebutton_hostname }}"
ansible.builtin.command: bbb-conf --setip "{{ bigbluebutton_hostname }}"
when: bigbluebutton_api_status.rc != 0
notify: Restart BigBlueButton services
+21 -26
View File
@@ -1,40 +1,35 @@
---
- name: Show applied tags
debug:
ansible.builtin.debug:
var: ansible_run_tags
tags:
- always
- name: Check OS and Version
fail:
ansible.builtin.fail:
msg: This is not Ubuntu 1804
when: ansible_distribution != "Ubuntu" and ansible_distribution_major_version != '18.04'
- name: "Include {{ role_name }} ubuntu1804 tasks"
include: "{{ role_name }}_ubuntu1804.yml"
when: ansible_distribution == "Ubuntu" and bigbluebutton_apt_repo_url is defined
and ('"all" in ansible_run_tags' or '"ubuntu1804" in ansible_run_tags')
- name: Include {{ role_name }} ubuntu1804 tasks
ansible.builtin._include: "{{ role_name }}_ubuntu1804.yml"
when: ansible_distribution == "Ubuntu" and bigbluebutton_apt_repo_url is defined and ('"all" in ansible_run_tags' or '"ubuntu1804" in ansible_run_tags')
- name: "Include {{ role_name }} html5 tasks"
include: "{{ role_name }}_html5.yml"
when: ansible_distribution == "Ubuntu" and bigbluebutton_apt_repo_url is defined
and ('"all" in ansible_run_tags' or '"html5" in ansible_run_tags')
- name: Include {{ role_name }} html5 tasks
ansible.builtin._include: "{{ role_name }}_html5.yml"
when: ansible_distribution == "Ubuntu" and bigbluebutton_apt_repo_url is defined and ('"all" in ansible_run_tags' or '"html5" in ansible_run_tags')
- name: "Include {{ role_name }} letsencrypt tasks"
include: "{{ role_name }}_letsencrypt.yml"
when: ansible_distribution == "Ubuntu" and bigbluebutton_apt_repo_url is defined
and ('"all" in ansible_run_tags' or '"letsencrypt" in ansible_run_tags')
- name: Include {{ role_name }} letsencrypt tasks
ansible.builtin._include: "{{ role_name }}_letsencrypt.yml"
when: ansible_distribution == "Ubuntu" and bigbluebutton_apt_repo_url is defined and ('"all" in ansible_run_tags' or '"letsencrypt" in ansible_run_tags')
- name: "Include {{ role_name }} https tasks"
include: "{{ role_name }}_https.yml"
when: ansible_distribution == "Ubuntu" and bigbluebutton_apt_repo_url is defined
and ('"all" in ansible_run_tags' or '"https" in ansible_run_tags')
- name: Include {{ role_name }} https tasks
ansible.builtin._include: "{{ role_name }}_https.yml"
when: ansible_distribution == "Ubuntu" and bigbluebutton_apt_repo_url is defined and ('"all" in ansible_run_tags' or '"https" in ansible_run_tags')
- name: "Include {{ role_name }} greenlight tasks"
include: "{{ role_name }}_greenlight.yml"
when: ansible_distribution == "Ubuntu" and bigbluebutton_apt_repo_url is defined
and ('"all" in ansible_run_tags' or '"greenlight" in ansible_run_tags')
- name: Include {{ role_name }} greenlight tasks
ansible.builtin._include: "{{ role_name }}_greenlight.yml"
when: ansible_distribution == "Ubuntu" and bigbluebutton_apt_repo_url is defined and ('"all" in ansible_run_tags' or '"greenlight" in ansible_run_tags')
- name: "Include {{ role_name }} coturn tasks"
include: "{{ role_name }}_coturn.yml"
when: ansible_distribution == "Ubuntu" and bigbluebutton_coturn_domain is defined
and ('"all" in ansible_run_tags' or '"coturn" in ansible_run_tags')
- name: Include {{ role_name }} coturn tasks
ansible.builtin._include: "{{ role_name }}_coturn.yml"
when: ansible_distribution == "Ubuntu" and bigbluebutton_coturn_domain is defined and ('"all" in ansible_run_tags' or '"coturn" in ansible_run_tags')
@@ -1,4 +1,5 @@
---
bigbluebutton_exporter_requires_package: python3-passlib
bigbluebutton_exporter_description: BigBlueButton exporter
bigbluebutton_exporter_proxy_basic_auth_username: bigbluebutton-exporter
bigbluebutton_exporter_nginx_data_dir: "{{ nginx_data_dir }}/proxies"
bigbluebutton_exporter_nginx_data_dir: "{{ nginx_data_dir }}/proxies"
+2 -1
View File
@@ -1,5 +1,6 @@
---
dependencies: # noqa 701
- role: docker_network
tags:
- docker_network
- depends
- depends
@@ -1,15 +1,16 @@
---
- name: Get BigBlueButton API secret # noqa 306
shell: "bbb-conf --secret | grep 'Secret: ' | sed 's/^ *Secret:\\s//g'"
ansible.builtin.shell: "bbb-conf --secret | grep 'Secret: ' | sed 's/^ *Secret:\\s//g'"
register: bigbluebutton_api_secret
changed_when: false
- name: Get BigBlueButton API url # noqa 306
shell: "bbb-conf --secret | grep 'URL: ' | sed 's/^ *URL:\\s//g'"
ansible.builtin.shell: "bbb-conf --secret | grep 'URL: ' | sed 's/^ *URL:\\s//g'"
register: bigbluebutton_api_url
changed_when: false
- name: "Start {{ role_name }} container {{ bigbluebutton_exporter_hostname }}"
docker_container:
- name: Start {{ role_name }} container {{ bigbluebutton_exporter_hostname }}
community.docker.docker_container:
name: "{{ bigbluebutton_exporter_hostname }}"
labels:
description: "{{ bigbluebutton_exporter_description }}"
@@ -21,11 +22,11 @@
API_SECRET: "{{ bigbluebutton_api_secret.stdout }}"
RECORDINGS_METRICS_READ_FROM_DISK: "true"
volumes:
- "/var/bigbluebutton:/var/bigbluebutton:ro"
- /var/bigbluebutton:/var/bigbluebutton:ro
networks:
- name: "{{ docker_network_name }}"
log_driver: "{{ docker_log_driver }}"
log_options:
max-size: "{{ docker_log_max_size }}"
max-file: "{{ docker_log_max_file }}"
tag: "{{ bigbluebutton_exporter_hostname }}|{{ role_name }}"
tag: "{{ bigbluebutton_exporter_hostname }}|{{ role_name }}"
@@ -1,24 +1,25 @@
---
- name: Ensure nginx data dir exists
file:
ansible.builtin.file:
path: "{{ bigbluebutton_exporter_nginx_data_dir }}"
state: directory
- name: Gather package facts
package_facts:
ansible.builtin.package_facts:
manager: auto
- name: "Fail if package {{ bigbluebutton_exporter_requires_package }} is not installed"
fail:
msg: "Package {{ bigbluebutton_exporter_requires_package }} is not installed!"
- name: Fail if package {{ bigbluebutton_exporter_requires_package }} is not installed
ansible.builtin.fail:
msg: Package {{ bigbluebutton_exporter_requires_package }} is not installed!
when: bigbluebutton_exporter_requires_package not in ansible_facts.packages
- name: "Configure user access for {{ role_name }}"
htpasswd:
- name: Configure user access for {{ role_name }}
community.general.htpasswd:
path: "{{ bigbluebutton_exporter_nginx_data_dir }}/bigbluebutton-exporter.htpasswd"
name: "{{ bigbluebutton_exporter_proxy_basic_auth_username }}"
password: "{{ bigbluebutton_exporter_proxy_basic_auth_password }}"
- name: "Copy nginx {{ role_name }} conf"
template:
- name: Copy nginx {{ role_name }} conf
ansible.builtin.template:
src: bigbluebutton-exporter.nginx
dest: "{{ bigbluebutton_exporter_nginx_data_dir }}/bigbluebutton-exporter.nginx"
dest: "{{ bigbluebutton_exporter_nginx_data_dir }}/bigbluebutton-exporter.nginx"
+6 -5
View File
@@ -1,12 +1,13 @@
- name: "Include {{ role_name }} tasks"
include_tasks: "{{ role_name }}.yml"
---
- name: Include {{ role_name }} tasks
ansible.builtin.include_tasks: "{{ role_name }}.yml"
when: bigbluebutton_exporter_image is defined
tags:
- bigbluebutton_exporter
- name: "Include {{ role_name }} nginx config tasks"
include_tasks: "{{ role_name }}_nginx_config.yml"
- name: Include {{ role_name }} nginx config tasks
ansible.builtin.include_tasks: "{{ role_name }}_nginx_config.yml"
when: bigbluebutton_exporter_image is defined
tags:
- bigbluebutton_exporter
- bigbluebutton_exporter_nginx_config
- bigbluebutton_exporter_nginx_config
+2 -1
View File
@@ -1,2 +1,3 @@
---
birt_description: BIRT
birt_data_dir: "/usr/share/{{ birt_hostname }}"
birt_data_dir: /usr/share/{{ birt_hostname }}
+6 -5
View File
@@ -1,10 +1,11 @@
- name: "Restart {{ role_name }} container"
docker_container:
---
- name: Restart {{ role_name }} container
community.docker.docker_container:
name: "{{ birt_hostname }}"
restart: true
- name: "Build {{ role_name }} custom image"
docker_image:
- name: Build {{ role_name }} custom image
community.docker.docker_image:
name: birt:custom
build:
path: "{{ docker_build_dir }}/{{ birt_hostname }}"
@@ -12,4 +13,4 @@
source: build
force_source: true
force_tag: true
state: present
state: present
+13 -13
View File
@@ -1,15 +1,16 @@
- name: "Ensure {{ role_name }} data dir exists"
file:
---
- name: Ensure {{ role_name }} data dir exists
ansible.builtin.file:
path: "{{ birt_data_dir }}"
state: directory
- name: "Ensure {{ role_name }} build dir exists"
file:
- name: Ensure {{ role_name }} build dir exists
ansible.builtin.file:
path: "{{ docker_build_dir }}/{{ birt_hostname }}"
state: directory
- name: "Copy {{ role_name }} Dockerfile"
template:
- name: Copy {{ role_name }} Dockerfile
ansible.builtin.template:
src: "{{ item }}"
dest: "{{ docker_build_dir }}/{{ birt_hostname }}/{{ item }}"
mode: +x
@@ -20,19 +21,18 @@
- run_jetty
- test.rptdesign
- .dockerignore
notify: "Build {{ role_name }} custom image"
notify: Build {{ role_name }} custom image
- name: Run get dependencies script
script: "get_dependencies"
ansible.builtin.script: get_dependencies
args:
chdir: "{{ docker_build_dir }}/{{ birt_hostname }}"
creates: "{{ docker_build_dir }}/{{ birt_hostname }}/birt-runtime-4.5.0.war"
- name: Flush handlers
meta: flush_handlers
- name: "Start {{ role_name }} container {{ birt_hostname }}"
docker_container:
ansible.builtin.meta: flush_handlers
- name: Start {{ role_name }} container {{ birt_hostname }}
community.docker.docker_container:
name: "{{ birt_hostname }}"
labels:
description: "{{ birt_description }}"
@@ -47,4 +47,4 @@
log_options:
max-size: "{{ docker_log_max_size }}"
max-file: "{{ docker_log_max_file }}"
tag: "{{ birt_hostname }}|{{ role_name }}"
tag: "{{ birt_hostname }}|{{ role_name }}"
+4 -3
View File
@@ -1,5 +1,6 @@
- name: "Include {{ role_name }} tasks"
include_tasks: "{{ role_name }}.yml"
---
- name: Include {{ role_name }} tasks
ansible.builtin.include_tasks: "{{ role_name }}.yml"
when: birt_image is defined
tags:
- birt
- birt
+2 -1
View File
@@ -1,2 +1,3 @@
---
blackbox_exporter_description: Blackbox exporter
blackbox_exporter_data_dir: "/usr/share/{{ blackbox_exporter_hostname }}"
blackbox_exporter_data_dir: /usr/share/{{ blackbox_exporter_hostname }}
+10 -9
View File
@@ -1,3 +1,4 @@
---
modules:
http_2xx:
prober: http
@@ -11,7 +12,7 @@ modules:
prober: tcp
tcp:
query_response:
- expect: "^+OK"
- expect: ^+OK
tls: true
tls_config:
insecure_skip_verify: false
@@ -19,20 +20,20 @@ modules:
prober: tcp
tcp:
query_response:
- expect: "^SSH-2.0-"
- send: "SSH-2.0-blackbox-ssh-check"
- expect: ^SSH-2.0-
- send: SSH-2.0-blackbox-ssh-check
irc_banner:
prober: tcp
tcp:
query_response:
- send: "NICK prober"
- send: "USER prober prober prober :prober"
- expect: "PING :([^ ]+)"
send: "PONG ${1}"
- expect: "^:[^ ]+ 001"
- send: NICK prober
- send: USER prober prober prober :prober
- expect: PING :([^ ]+)
send: PONG ${1}
- expect: ^:[^ ]+ 001
icmp:
prober: icmp
http_401_unauth:
prober: http
http:
valid_status_codes: [403,401,200]
valid_status_codes: [403, 401, 200]
+2 -1
View File
@@ -1,5 +1,6 @@
---
dependencies: # noqa 701
- role: prometheus
tags:
- prometheus
- depends
- depends
@@ -1,17 +1,18 @@
- name: "Ensure {{ role_name }} data dir exists"
file:
---
- name: Ensure {{ role_name }} data dir exists
ansible.builtin.file:
path: "{{ blackbox_exporter_data_dir }}"
state: directory
- name: Copy {{ role_name }} conf files
copy:
ansible.builtin.copy:
src: "{{ item }}"
dest: "{{ blackbox_exporter_data_dir }}/"
loop:
- files/config.yml
- name: "Start {{ role_name }} container {{ blackbox_exporter_hostname }}"
docker_container:
- name: Start {{ role_name }} container {{ blackbox_exporter_hostname }}
community.docker.docker_container:
name: "{{ blackbox_exporter_hostname }}"
labels:
description: "{{ blackbox_exporter_description }}"
@@ -26,4 +27,4 @@
log_options:
max-size: "{{ docker_log_max_size }}"
max-file: "{{ docker_log_max_file }}"
tag: "{{ blackbox_exporter_hostname }}|{{ role_name }}"
tag: "{{ blackbox_exporter_hostname }}|{{ role_name }}"
+4 -3
View File
@@ -1,5 +1,6 @@
- name: "Include {{ role_name }} tasks"
include_tasks: "{{ role_name }}.yml"
---
- name: Include {{ role_name }} tasks
ansible.builtin.include_tasks: "{{ role_name }}.yml"
when: blackbox_exporter_image is defined
tags:
- blackbox_exporter
- blackbox_exporter
+2 -1
View File
@@ -1,2 +1,3 @@
---
bookstack_description: BookStack
bookstack_data_dir: "/usr/share/{{ bookstack_hostname }}"
bookstack_data_dir: /usr/share/{{ bookstack_hostname }}
+2 -1
View File
@@ -1,5 +1,6 @@
---
dependencies: # noqa 701
- role: mysql
tags:
- mysql
- depends
- depends
+6 -5
View File
@@ -1,10 +1,11 @@
- name: "Ensure {{ role_name }} data dir exists"
file:
---
- name: Ensure {{ role_name }} data dir exists
ansible.builtin.file:
path: "{{ bookstack_data_dir }}"
state: directory
- name: "Start {{ role_name }} container {{ bookstack_hostname }}"
docker_container:
- name: Start {{ role_name }} container {{ bookstack_hostname }}
community.docker.docker_container:
name: "{{ bookstack_hostname }}"
labels:
description: "{{ bookstack_description }}"
@@ -32,4 +33,4 @@
log_options:
max-size: "{{ docker_log_max_size }}"
max-file: "{{ docker_log_max_file }}"
tag: "{{ bookstack_hostname }}|{{ role_name }}"
tag: "{{ bookstack_hostname }}|{{ role_name }}"
+4 -3
View File
@@ -1,5 +1,6 @@
- name: "Include {{ role_name }} tasks"
include_tasks: "{{ role_name }}.yml"
---
- name: Include {{ role_name }} tasks
ansible.builtin.include_tasks: "{{ role_name }}.yml"
when: bookstack_image is defined
tags:
- bookstack
- bookstack
+2 -1
View File
@@ -1,4 +1,5 @@
---
cadvisor_requires_package: python3-passlib
cadvisor_description: "cAdvisor {{ inventory_hostname_short }}"
cadvisor_description: cAdvisor {{ inventory_hostname_short }}
cadvisor_proxy_basic_auth_username: cadvisor
cadvisor_nginx_data_dir: "{{ nginx_data_dir }}/proxies"
+2 -1
View File
@@ -1,5 +1,6 @@
---
dependencies: # noqa 701
- role: docker_network
tags:
- docker_network
- depends
- depends
+5 -4
View File
@@ -1,5 +1,6 @@
- name: "Start {{ role_name }} container {{ cadvisor_hostname }}"
docker_container:
---
- name: Start {{ role_name }} container {{ cadvisor_hostname }}
community.docker.docker_container:
name: "{{ cadvisor_hostname }}"
labels:
description: "{{ cadvisor_description }}"
@@ -15,11 +16,11 @@
- /dev/disk/:/dev/disk:ro
devices:
- /dev/kmsg:/dev/kmsg
command: "--housekeeping_interval=30s --docker_only=true"
command: --housekeeping_interval=30s --docker_only=true
networks:
- name: "{{ docker_network_name }}"
log_driver: "{{ docker_log_driver }}"
log_options:
max-size: "{{ docker_log_max_size }}"
max-file: "{{ docker_log_max_file }}"
tag: "{{ cadvisor_hostname }}|{{ role_name }}"
tag: "{{ cadvisor_hostname }}|{{ role_name }}"
+11 -10
View File
@@ -1,24 +1,25 @@
---
- name: Ensure nginx data dir exists
file:
ansible.builtin.file:
path: "{{ cadvisor_nginx_data_dir }}"
state: directory
- name: Gather package facts
package_facts:
ansible.builtin.package_facts:
manager: auto
- name: "Fail if package {{ cadvisor_requires_package }} is not installed"
fail:
msg: "Package {{ cadvisor_requires_package }} is not installed!"
- name: Fail if package {{ cadvisor_requires_package }} is not installed
ansible.builtin.fail:
msg: Package {{ cadvisor_requires_package }} is not installed!
when: cadvisor_requires_package not in ansible_facts.packages
- name: "Configure user access for {{ role_name }}"
htpasswd:
- name: Configure user access for {{ role_name }}
community.general.htpasswd:
path: "{{ cadvisor_nginx_data_dir }}/cadvisor.htpasswd"
name: "{{ cadvisor_proxy_basic_auth_username }}"
password: "{{ cadvisor_proxy_basic_auth_password }}"
- name: "Copy nginx {{ role_name }} conf"
template:
- name: Copy nginx {{ role_name }} conf
ansible.builtin.template:
src: cadvisor.nginx
dest: "{{ cadvisor_nginx_data_dir }}/cadvisor.nginx"
dest: "{{ cadvisor_nginx_data_dir }}/cadvisor.nginx"
+6 -5
View File
@@ -1,12 +1,13 @@
- name: "Include {{ role_name }} tasks"
include_tasks: "{{ role_name }}.yml"
---
- name: Include {{ role_name }} tasks
ansible.builtin.include_tasks: "{{ role_name }}.yml"
when: cadvisor_image is defined
tags:
- cadvisor
- name: "Include {{ role_name }} nginx config tasks"
include_tasks: "{{ role_name }}_nginx_config.yml"
- name: Include {{ role_name }} nginx config tasks
ansible.builtin.include_tasks: "{{ role_name }}_nginx_config.yml"
when: cadvisor_image is defined
tags:
- cadvisor
- cadvisor_nginx_config
- cadvisor_nginx_config
+2 -1
View File
@@ -1 +1,2 @@
cargo_enabled: false
---
cargo_enabled: false
+9 -8
View File
@@ -1,24 +1,25 @@
---
- name: Download installer rustup
get_url:
ansible.builtin.get_url:
url: https://static.rust-lang.org/rustup.sh
dest: "~/rustup.sh"
dest: ~/rustup.sh
mode: "0750"
- name: Run installer rustup
command:
ansible.builtin.command:
cmd: ./rustup.sh -y
chdir: "~"
creates: "/usr/local/bin/cargo"
creates: /usr/local/bin/cargo
environment:
CARGO_HOME: "/usr/local"
CARGO_HOME: /usr/local
- name: Register installed cargo crates
command: "cargo install --list"
ansible.builtin.command: cargo install --list
register: installed_cargo_crates
changed_when: false
- name: Install cargo packages
command:
cmd: "cargo install --git {{ item.git }} --tag {{ item.tag }} {{ item.name }}"
ansible.builtin.command:
cmd: cargo install --git {{ item.git }} --tag {{ item.tag }} {{ item.name }}
when: item.name not in installed_cargo_crates.stdout
loop: "{{ cargo_packages }}"
+4 -3
View File
@@ -1,5 +1,6 @@
- name: "Include {{ role_name }} tasks"
include_tasks: "{{ role_name }}.yml"
---
- name: Include {{ role_name }} tasks
ansible.builtin.include_tasks: "{{ role_name }}.yml"
when: cargo_enabled
tags:
- cargo
- cargo
+3 -2
View File
@@ -1,4 +1,5 @@
---
certbot_build_image: false
certbot_preferred_challenges: http
certbot_data_dir: "/usr/share/{{ certbot_hostname }}"
nginx_data_dir: "/usr/share/{{ nginx_hostname }}"
certbot_data_dir: /usr/share/{{ certbot_hostname }}
nginx_data_dir: /usr/share/{{ nginx_hostname }}
+4 -3
View File
@@ -1,5 +1,6 @@
- name: "Build {{ role_name }} custom image"
docker_image:
---
- name: Build {{ role_name }} custom image
community.docker.docker_image:
name: "{{ certbot_image }}"
build:
path: "{{ docker_build_dir }}/{{ certbot_hostname }}"
@@ -7,4 +8,4 @@
source: build
force_source: true
force_tag: true
state: present
state: present
+2 -1
View File
@@ -1,5 +1,6 @@
---
dependencies: # noqa 701
- role: docker_network
tags:
- docker_network
- depends
- depends
+31 -30
View File
@@ -1,50 +1,51 @@
- name: "Ensure nginx data dir exists"
file:
---
- name: Ensure nginx data dir exists
ansible.builtin.file:
path: "{{ nginx_data_dir }}/proxies"
state: directory
- name: "Copy {{ role_name }} templated scripts"
template:
- name: Copy {{ role_name }} templated scripts
ansible.builtin.template:
src: "{{ item }}"
dest: "/usr/local/bin/{{ item }}"
dest: /usr/local/bin/{{ item }}
mode: +x
loop:
- docker-certbot-renew
- docker-certbot-list
- name: "Copy {{ role_name }} scripts"
copy:
- name: Copy {{ role_name }} scripts
ansible.builtin.copy:
src: "{{ item }}"
dest: "/usr/local/bin/{{ item }}"
dest: /usr/local/bin/{{ item }}
mode: +x
loop:
- docker-certbot-delete
- docker-certbot-create
- name: "Get list of nginx certs"
stat:
- name: Get list of nginx certs
ansible.builtin.stat:
path: "{{ certbot_data_dir }}/live/{{ item.src_hostname | replace('*.', '') }}"
loop: "{{ nginx_proxies }}"
register: certbot_certs
when: item.ssl is defined and item.ssl
- name: "Create list of missing certs"
set_fact:
- name: Create list of missing certs
ansible.builtin.set_fact:
certbot_missing_certs: "{{ certbot_certs | json_query('results[*] | [?stat.exists==`false`].item.src_hostname') | list }}"
when: nginx_proxies is defined
- name: "Log missing certificates"
debug:
- name: Log missing certificates
ansible.builtin.debug:
var: certbot_missing_certs
- name: "Copy nginx default conf"
copy:
- name: Copy nginx default conf
ansible.builtin.copy:
src: default.conf
dest: "{{ nginx_data_dir }}/default.conf"
force: false
- name: "Copy nginx {{ role_name }} conf"
template:
- name: Copy nginx {{ role_name }} conf
ansible.builtin.template:
src: nginx-certbot.conf
dest: "{{ nginx_data_dir }}/proxies/{{ item }}.conf"
vars:
@@ -52,20 +53,20 @@
loop: "{{ certbot_missing_certs }}"
when: certbot_missing_certs is defined
- name: "Get infos on container {{ nginx_hostname }}"
docker_container_info:
- name: Get infos on container {{ nginx_hostname }}
community.docker.docker_container_info:
name: "{{ nginx_hostname }}"
register: nginx_container
- name: "Restart container {{ nginx_hostname }}"
docker_container:
- name: Restart container {{ nginx_hostname }}
community.docker.docker_container:
name: "{{ nginx_hostname }}"
restart: true
state: started
when: nginx_container.exists and certbot_missing_certs
- name: "Start proxy container {{ nginx_hostname }}"
docker_container:
- name: Start proxy container {{ nginx_hostname }}
community.docker.docker_container:
name: "{{ nginx_hostname }}"
labels:
description: "{{ nginx_description }}"
@@ -86,13 +87,13 @@
tag: "{{ nginx_hostname }}|{{ role_name }}"
when: not nginx_container.exists and certbot_missing_certs is defined
- name: "Wait for proxy container"
pause:
- name: Wait for proxy container
ansible.builtin.pause:
seconds: "2"
when: certbot_missing_certs is defined
- name: "Issue certificate with {{ role_name }}"
command: >-
- name: Issue certificate with {{ role_name }}
ansible.builtin.command: >-
docker run --rm --name {{ item }}
-v {{ certbot_data_dir }}/:/etc/letsencrypt/
-v {{ certbot_data_dir }}/www/:/var/www/certbot/ {{ certbot_image }}
@@ -103,8 +104,8 @@
failed_when: result.stdout is search('Some challenges have failed.') or result.failed
changed_when: result.stdout is search('Congratulations!') or not result.failed
- name: "Issue certificate with dns-freends authenticator"
command: >-
- name: Issue certificate with dns-freends authenticator
ansible.builtin.command: >-
docker run --rm --name {{ item }}
-v {{ certbot_data_dir }}/:/etc/letsencrypt/
-v {{ certbot_data_dir }}/www/:/var/www/certbot/ {{ certbot_image }} certonly
+7 -6
View File
@@ -1,16 +1,17 @@
- name: "Ensure {{ role_name }} build dir exists"
file:
---
- name: Ensure {{ role_name }} build dir exists
ansible.builtin.file:
path: "{{ docker_build_dir }}/{{ certbot_hostname }}"
state: directory
- name: "Copy {{ role_name }} Dockerfile"
template:
- name: Copy {{ role_name }} Dockerfile
ansible.builtin.template:
src: "{{ item }}"
dest: "{{ docker_build_dir }}/{{ certbot_hostname }}/{{ item }}"
loop:
- Dockerfile
- .dockerignore
notify: "Build {{ role_name }} custom image"
notify: Build {{ role_name }} custom image
- name: Flush handlers
meta: flush_handlers
ansible.builtin.meta: flush_handlers
+8 -7
View File
@@ -1,5 +1,6 @@
- name: "Dig src DNS record"
debug:
---
- name: Dig src DNS record
ansible.builtin.debug:
msg: "{{ lookup('dig', item.src_hostname) }}"
loop: "{{ nginx_proxies }}"
when: item.ssl is defined and item.ssl
@@ -7,14 +8,14 @@
tags:
- check
- name: "Dig host DNS record"
debug:
- name: Dig host DNS record
ansible.builtin.debug:
msg: "{{ lookup('dig', ansible_host) }}"
register: dig_host
- name: "Fail if src IP is not resolved correctly"
fail:
msg: "DNS record for {{ item.item.src_hostname }} does not point to proxy host."
- name: Fail if src IP is not resolved correctly
ansible.builtin.fail:
msg: DNS record for {{ item.item.src_hostname }} does not point to proxy host.
when: item.msg is defined and item.msg != dig_host.msg and item.msg != 'NXDOMAIN'
loop: "{{ dig_src.results }}"
tags:
+11 -10
View File
@@ -1,16 +1,17 @@
- name: "Register existing {{ role_name }} certificates" # noqa 306
shell: "ls -1 -d {{ certbot_data_dir }}/live/*/ | xargs -n 1 basename"
---
- name: Register existing {{ role_name }} certificates # noqa 306
ansible.builtin.shell: ls -1 -d {{ certbot_data_dir }}/live/*/ | xargs -n 1 basename
changed_when: false
ignore_errors: true
register: certbot_managed_certs
- name: "Create managed certificate list from proxy list"
set_fact:
- name: Create managed certificate list from proxy list
ansible.builtin.set_fact:
managed_certs: "{{ nginx_proxies | selectattr('ssl', 'defined') | map(attribute='src_hostname') | map('replace', '*.', '') | list }}"
when: nginx_proxies is defined
- name: "Remove unmanaged certificate with {{ role_name }}"
docker_container:
- name: Remove unmanaged certificate with {{ role_name }}
community.docker.docker_container:
name: "{{ item | replace('*.', 'wildcard') }}"
image: "{{ certbot_image }}"
volumes:
@@ -23,15 +24,15 @@
loop_control:
pause: 5
- name: "Remove unmanaged certificate live folder"
file:
- name: Remove unmanaged certificate live folder
ansible.builtin.file:
path: "{{ certbot_data_dir }}/live/{{ item }}"
state: absent
loop: "{{ certbot_managed_certs.stdout_lines }}"
when: item not in managed_certs
- name: "Copy nginx ssl conf files"
copy:
- name: Copy nginx ssl conf files
ansible.builtin.copy:
src: "{{ item }}"
dest: "{{ certbot_data_dir }}/"
loop:
+5 -4
View File
@@ -1,7 +1,8 @@
- name: "Register renew certs job"
cron:
name: "Renew certs for {{ nginx_hostname }}"
---
- name: Register renew certs job
ansible.builtin.cron:
name: Renew certs for {{ nginx_hostname }}
minute: "{{ 59 |random(seed=nginx_hostname) }}"
hour: "0"
weekday: "0"
job: "docker-certbot-renew && docker restart {{ nginx_hostname }}; write-node-exporter-metric -c 'Renew certs for {{ nginx_hostname }}' -v $?"
job: docker-certbot-renew && docker restart {{ nginx_hostname }}; write-node-exporter-metric -c 'Renew certs for {{ nginx_hostname }}' -v $?
+6 -5
View File
@@ -1,11 +1,12 @@
- name: "Ensure {{ certbot_data_dir }} data dir exists"
file:
---
- name: Ensure {{ certbot_data_dir }} data dir exists
ansible.builtin.file:
path: "{{ certbot_data_dir }}/.secrets"
state: directory
- name: "Copy secrets files"
copy:
- name: Copy secrets files
ansible.builtin.copy:
content: "{{ item.content }}"
dest: "{{ certbot_data_dir }}/.secrets/{{ item.file }}"
mode: "0600"
loop: "{{ certbot_secrets }}"
loop: "{{ certbot_secrets }}"
+10 -9
View File
@@ -1,14 +1,15 @@
- name: "Create list of wildcard certs"
set_fact:
---
- name: Create list of wildcard certs
ansible.builtin.set_fact:
certbot_wildcard_certs: "{{ nginx_proxies | json_query('[?contains(src_hostname, `*`)].src_hostname') | list }}"
when: nginx_proxies is defined
- name: "Log wildcard certificates"
debug:
- name: Log wildcard certificates
ansible.builtin.debug:
var: certbot_wildcard_certs
- name: "Copy {{ role_name }} vercel scripts"
template:
- name: Copy {{ role_name }} vercel scripts
ansible.builtin.template:
src: "{{ item }}"
dest: "{{ certbot_data_dir }}/{{ item }}"
mode: +x
@@ -22,7 +23,7 @@
# docker run --rm --name {{ item | replace('*.', 'wildcard') }}
# -v {{ certbot_data_dir }}/:/etc/letsencrypt/
# -v {{ certbot_data_dir }}/www/:/var/www/certbot/ {{ certbot_image }} certonly
# --manual --preferred-challenges=dns
# --manual --preferred-challenges=dns
# --manual-auth-hook /etc/letsencrypt/vercel-pre-hook
# --manual-cleanup-hook /etc/letsencrypt/vercel-post-hook
# --email {{ certbot_email }} --agree-tos -d {{ item }}
@@ -32,8 +33,8 @@
# failed_when: result.stdout is search('Some challenges have failed.') or result.failed
# changed_when: result.stdout is search('Congratulations!') or not result.failed
- name: "Issue certificate with {{ role_name }} manually"
fail:
- name: Issue certificate with {{ role_name }} manually
ansible.builtin.fail:
msg: >-
Run this command manually:
docker run -it --rm --name {{ item | replace('*.', 'wildcard') }}
+19 -18
View File
@@ -1,49 +1,50 @@
- name: "On build set new image tag {{ role_name }}:{{ certbot_hostname }}"
set_fact:
certbot_image: "certbot:{{ certbot_hostname }}"
---
- name: On build set new image tag {{ role_name }}:{{ certbot_hostname }}
ansible.builtin.set_fact:
certbot_image: certbot:{{ certbot_hostname }}
certbot_build_image: "{{ certbot_image }}"
when: certbot_build_image and certbot_build_image != certbot_image
tags:
- certbot
- name: "Include {{ role_name }} build tasks"
include_tasks: "{{ role_name }}_build.yml"
- name: Include {{ role_name }} build tasks
ansible.builtin.include_tasks: "{{ role_name }}_build.yml"
when: certbot_build_image and certbot_build_image != certbot_image
tags:
- certbot
- name: "Include {{ role_name }} secrets tasks"
include_tasks: "{{ role_name }}_secrets.yml"
- name: Include {{ role_name }} secrets tasks
ansible.builtin.include_tasks: "{{ role_name }}_secrets.yml"
when: certbot_secrets is defined
tags:
- certbot
- name: "Include {{ role_name }} check tasks"
include_tasks: "{{ role_name }}_check.yml"
- name: Include {{ role_name }} check tasks
ansible.builtin.include_tasks: "{{ role_name }}_check.yml"
when: certbot_image is defined
tags:
- certbot
- name: "Include {{ role_name }} wildcard tasks"
include_tasks: "{{ role_name }}_wildcard.yml"
- name: Include {{ role_name }} wildcard tasks
ansible.builtin.include_tasks: "{{ role_name }}_wildcard.yml"
when: certbot_authenticator is defined and certbot_authenticator == 'vercel'
tags:
- certbot
- name: "Include {{ role_name }} tasks"
include_tasks: "{{ role_name }}.yml"
- name: Include {{ role_name }} tasks
ansible.builtin.include_tasks: "{{ role_name }}.yml"
when: certbot_image is defined
tags:
- certbot
- name: "Include {{ role_name }} renew tasks"
include_tasks: "{{ role_name }}_renew.yml"
- name: Include {{ role_name }} renew tasks
ansible.builtin.include_tasks: "{{ role_name }}_renew.yml"
when: certbot_image is defined
tags:
- certbot
- name: "Include {{ role_name }} cleanup tasks"
include_tasks: "{{ role_name }}_cleanup.yml"
- name: Include {{ role_name }} cleanup tasks
ansible.builtin.include_tasks: "{{ role_name }}_cleanup.yml"
when: certbot_image is defined
tags:
- certbot
- certbot
+3 -2
View File
@@ -1,6 +1,7 @@
---
elasticsearch_data_dir: "{{ elasticsearch_hostname }}"
elasticsearch_volume_name: "{{ elasticsearch_hostname }}"
moodle_volume_name: "{{ moodle_hostname }}"
odoo_data_dir: "/usr/share/{{ odoo_hostname }}"
odoo_data_dir: /usr/share/{{ odoo_hostname }}
odoo_volume_name: "{{ odoo_hostname }}"
postgres_volume_name: "{{ postgres_hostname }}"
postgres_volume_name: "{{ postgres_hostname }}"
+17 -16
View File
@@ -1,34 +1,35 @@
- name: "Remove greenlight container {{ greenlight_hostname }}"
docker_container:
---
- name: Remove greenlight container {{ greenlight_hostname }}
community.docker.docker_container:
name: "{{ greenlight_hostname }}"
state: absent
- name: "Register bigbluebutton packages" # noqa 306
shell: "dpkg -l | grep bbb | cut -d' ' -f3"
- name: Register bigbluebutton packages # noqa 306
ansible.builtin.shell: dpkg -l | grep bbb | cut -d' ' -f3
changed_when: false
register: bbb_packages
- name: Uninstall bigbluebutton
apt:
ansible.builtin.apt:
name: "{{ item }}"
state: absent
loop: "{{ bbb_packages.stdout_lines }}"
- name: Uninstall bigbluebutton dependencies
apt:
ansible.builtin.apt:
name: "{{ item }}"
state: absent
loop:
- nginx
- name: Remove dependencies that are no longer required
apt:
ansible.builtin.apt:
autoremove: true
- name: "Remove bigbluebutton files and folders"
file:
- name: Remove bigbluebutton files and folders
ansible.builtin.file:
path: "{{ item }}"
state: "absent"
state: absent
loop:
- /etc/bigbluebutton/ # bigbluebutton
- /usr/local/bigbluebutton
@@ -54,11 +55,11 @@
- /usr/share/meteor # meteor
- name: Remove cron job to renew letsencrypt certficiates
cron:
name: "Renew letsencrypt certificates"
state: "absent"
ansible.builtin.cron:
name: Renew letsencrypt certificates
state: absent
- name: Remove cron job to restart nginx
cron:
name: "Restart nginx"
state: "absent"
ansible.builtin.cron:
name: Restart nginx
state: absent
+5 -4
View File
@@ -1,10 +1,11 @@
- name: "Remove bookstack container {{ bookstack_hostname }}"
docker_container:
---
- name: Remove bookstack container {{ bookstack_hostname }}
community.docker.docker_container:
name: "{{ bookstack_hostname }}"
state: absent
- name: Remove bookstack data dir
file:
ansible.builtin.file:
path: "{{ bookstack_data_dir }}"
state: absent
when: '"bookstack_data" in ansible_run_tags'
when: '"bookstack_data" in ansible_run_tags'
+5 -4
View File
@@ -1,10 +1,11 @@
- name: "Remove cadvisor container {{ cadvisor_hostname }}"
docker_container:
---
- name: Remove cadvisor container {{ cadvisor_hostname }}
community.docker.docker_container:
name: "{{ cadvisor_hostname }}"
state: absent
- name: Remove cadvisor data dir
file:
ansible.builtin.file:
path: "{{ cadvisor_data_dir }}"
state: absent
when: '"cadvisor_data" in ansible_run_tags'
when: '"cadvisor_data" in ansible_run_tags'
+4 -3
View File
@@ -1,6 +1,7 @@
- name: "Remove certbot container {{ certbot_hostname }}"
docker_container:
---
- name: Remove certbot container {{ certbot_hostname }}
community.docker.docker_container:
name: "{{ certbot_hostname }}"
state: absent
# Do not remove certbot data dir
# Do not remove certbot data dir
+4 -3
View File
@@ -1,4 +1,5 @@
- name: "Remove collabora_code container {{ collabora_code_hostname }}"
docker_container:
---
- name: Remove collabora_code container {{ collabora_code_hostname }}
community.docker.docker_container:
name: "{{ collabora_code_hostname }}"
state: absent
state: absent
+4 -3
View File
@@ -1,4 +1,5 @@
- name: "Remove commento container {{ commento_hostname }}"
docker_container:
---
- name: Remove commento container {{ commento_hostname }}
community.docker.docker_container:
name: "{{ commento_hostname }}"
state: absent
state: absent
+7 -6
View File
@@ -1,18 +1,19 @@
- name: "Remove docker_compose project"
command: "docker-compose -p {{ docker_compose_project_name }} down -v"
---
- name: Remove docker_compose project
ansible.builtin.command: docker-compose -p {{ docker_compose_project_name }} down -v
args:
chdir: "{{ docker_compose_data_dir }}"
register: result
changed_when: true
- name: Remove docker_compose data dir
file:
ansible.builtin.file:
path: "{{ docker_compose_data_dir }}"
state: absent
when: '"docker_compose_data" in ansible_run_tags'
- name: Remove docker_compose
file:
path: "/usr/local/bin/docker-compose"
ansible.builtin.file:
path: /usr/local/bin/docker-compose
state: absent
when: '"docker_compose_data" in ansible_run_tags'
when: '"docker_compose_data" in ansible_run_tags'
+3 -2
View File
@@ -1,5 +1,6 @@
---
- name: Remove docker network
docker_network:
community.docker.docker_network:
name: "{{ docker_network_name }}"
state: absent
when: docker_network_name is defined
when: docker_network_name is defined
+3 -2
View File
@@ -1,4 +1,5 @@
---
- name: Init a new swarm with default parameters
docker_swarm:
community.docker.docker_swarm:
state: absent
force: true
force: true
+7 -6
View File
@@ -1,16 +1,17 @@
- name: "Remove elasticsearch container {{ elasticsearch_hostname }}"
docker_container:
---
- name: Remove elasticsearch container {{ elasticsearch_hostname }}
community.docker.docker_container:
name: "{{ elasticsearch_hostname }}"
state: absent
- name: "Remove elasticsearch volume {{ elasticsearch_volume_name }}"
docker_volume:
- name: Remove elasticsearch volume {{ elasticsearch_volume_name }}
community.docker.docker_volume:
name: "{{ elasticsearch_volume_name }}"
state: absent
when: ("elasticsearch_volume" in ansible_run_tags)
- name: "Remove elasticsearch data dir {{ elasticsearch_data_dir }}"
file:
- name: Remove elasticsearch data dir {{ elasticsearch_data_dir }}
ansible.builtin.file:
path: "{{ elasticsearch_data_dir }}"
state: absent
when: ("elasticsearch_data" in ansible_run_tags)
+7 -6
View File
@@ -1,18 +1,19 @@
- name: "Remove elasticsearch container {{ item.hostname }}"
docker_container:
---
- name: Remove elasticsearch container {{ item.hostname }}
community.docker.docker_container:
name: "{{ item.hostname }}"
state: absent
loop: "{{ elasticsearch_nodes }}"
- name: "Remove elasticsearch volume {{ item.volume_name }}"
docker_volume:
- name: Remove elasticsearch volume {{ item.volume_name }}
community.docker.docker_volume:
name: "{{ item.volume_name }}"
state: absent
loop: "{{ elasticsearch_nodes }}"
when: ("elasticsearch_volume" in ansible_run_tags)
- name: "Remove elasticsearch data dir {{ item.data_dir }}"
file:
- name: Remove elasticsearch data dir {{ item.data_dir }}
ansible.builtin.file:
path: "{{ item.data_dir }}"
state: absent
loop: "{{ elasticsearch_nodes }}"
+4 -3
View File
@@ -1,4 +1,5 @@
- name: "Remove fathom container {{ fathom_hostname }}"
docker_container:
---
- name: Remove fathom container {{ fathom_hostname }}
community.docker.docker_container:
name: "{{ fathom_hostname }}"
state: absent
state: absent
+5 -4
View File
@@ -1,16 +1,17 @@
- name: "Remove grafana container {{ grafana_hostname }}"
docker_container:
---
- name: Remove grafana container {{ grafana_hostname }}
community.docker.docker_container:
name: "{{ grafana_hostname }}"
state: absent
- name: Remove grafana data dir
file:
ansible.builtin.file:
path: "{{ grafana_data_dir }}"
state: absent
when: '"grafana_data" in ansible_run_tags'
- name: Remove grafana volume
docker_volume:
community.docker.docker_volume:
name: "{{ grafana_volume_name }}"
state: absent
when: '"grafana_volume" in ansible_run_tags'
+8 -7
View File
@@ -1,16 +1,17 @@
- name: "Remove invitation file"
file:
path: "/var/tmp/{{ innernet_client_peer_name }}.yml"
---
- name: Remove invitation file
ansible.builtin.file:
path: /var/tmp/{{ innernet_client_peer_name }}.yml
state: absent
- name: Disable innernet service
systemd:
ansible.builtin.systemd:
name: innernet@{{ innernet_client_network_name }}"
state: stopped
enabled: false
# FIXME cannot confirm deletion
- name: Remove innernet client network
command:
cmd: "innernet uninstall {{ innernet_client_network_name }}"
removes: "/var/lib/innernet/{{ innernet_client_network_name }}.json"
ansible.builtin.command:
cmd: innernet uninstall {{ innernet_client_network_name }}
removes: /var/lib/innernet/{{ innernet_client_network_name }}.json
+7 -6
View File
@@ -1,17 +1,18 @@
---
- name: Remove peer invitation files
file:
path: "/var/tmp/{{ item.name }}.yml"
ansible.builtin.file:
path: /var/tmp/{{ item.name }}.yml
state: absent
loop: "{{ innernet_server_peers }}"
- name: Disable innernet server service
systemd:
ansible.builtin.systemd:
name: innernet-server@{{ innernet_server_network_name }}"
state: stopped
enabled: false
# FIXME cannot confirm deletion
- name: Remove innernet server network
command:
cmd: "innernet-server uninstall {{ innernet_server_network_name }}"
removes: "/var/lib/innernet-server/{{ innernet_server_network_name }}.db"
ansible.builtin.command:
cmd: innernet-server uninstall {{ innernet_server_network_name }}
removes: /var/lib/innernet-server/{{ innernet_server_network_name }}.db
+4 -3
View File
@@ -1,4 +1,5 @@
- name: "Remove keycloak container {{ keycloak_hostname }}"
docker_container:
---
- name: Remove keycloak container {{ keycloak_hostname }}
community.docker.docker_container:
name: "{{ keycloak_hostname }}"
state: absent
state: absent
+4 -3
View File
@@ -1,4 +1,5 @@
- name: "Remove kibana container {{ kibana_hostname }}"
docker_container:
---
- name: Remove kibana container {{ kibana_hostname }}
community.docker.docker_container:
name: "{{ kibana_hostname }}"
state: absent
state: absent
+5 -4
View File
@@ -1,10 +1,11 @@
- name: "Remove logstash container {{ logstash_hostname }}"
docker_container:
---
- name: Remove logstash container {{ logstash_hostname }}
community.docker.docker_container:
name: "{{ logstash_hostname }}"
state: absent
- name: Remove logstash data dir
file:
ansible.builtin.file:
path: "{{ logstash_data_dir }}"
state: absent
when: '"logstash_data" in ansible_run_tags'
when: '"logstash_data" in ansible_run_tags'
+3 -2
View File
@@ -1,4 +1,5 @@
- name: "Remove MailHog container {{ mailhog_hostname }}"
docker_container:
---
- name: Remove MailHog container {{ mailhog_hostname }}
community.docker.docker_container:
name: "{{ mailhog_hostname }}"
state: absent
+3 -2
View File
@@ -1,5 +1,6 @@
---
- name: Include cleanup tasks
include_tasks: "{{ item }}.yml"
ansible.builtin.include_tasks: "{{ item }}.yml"
when: item in tasks
loop: "{{ ansible_run_tags }}"
vars:
@@ -39,4 +40,4 @@
- innernet_server
- moodle
- redis
- mailhog
- mailhog
+5 -4
View File
@@ -1,10 +1,11 @@
- name: "Remove metricbeat container {{ metricbeat_hostname }}"
docker_container:
---
- name: Remove metricbeat container {{ metricbeat_hostname }}
community.docker.docker_container:
name: "{{ metricbeat_hostname }}"
state: absent
- name: Remove metricbeat data dir
file:
ansible.builtin.file:
path: "{{ metricbeat_data_dir }}"
state: absent
when: '"metricbeat_data" in ansible_run_tags'
when: '"metricbeat_data" in ansible_run_tags'
+3 -2
View File
@@ -1,5 +1,6 @@
---
- name: Remove modsecurity data dir
file:
ansible.builtin.file:
path: "{{ modsecurity_data_dir }}"
state: absent
when: '"modsecurity_data" in ansible_run_tags'
when: '"modsecurity_data" in ansible_run_tags'
+4 -3
View File
@@ -1,10 +1,11 @@
- name: "Remove moodle container {{ moodle_hostname }}"
docker_container:
---
- name: Remove moodle container {{ moodle_hostname }}
community.docker.docker_container:
name: "{{ moodle_hostname }}"
state: absent
- name: Remove moodle volume
docker_volume:
community.docker.docker_volume:
name: "{{ moodle_volume_name }}"
state: absent
when: '"moodle_volume" in ansible_run_tags'
+5 -4
View File
@@ -1,10 +1,11 @@
- name: "Remove mysql container {{ mysql_hostname }}"
docker_container:
---
- name: Remove mysql container {{ mysql_hostname }}
community.docker.docker_container:
name: "{{ mysql_hostname }}"
state: absent
- name: "Remove mysql volume {{ mysql_volume_name }}"
docker_volume:
- name: Remove mysql volume {{ mysql_volume_name }}
community.docker.docker_volume:
name: "{{ mysql_volume_name }}"
state: absent
when: '"mysql_volume" in ansible_run_tags'
+5 -4
View File
@@ -1,10 +1,11 @@
- name: "Remove nextcloud container {{ nextcloud_hostname }}"
docker_container:
---
- name: Remove nextcloud container {{ nextcloud_hostname }}
community.docker.docker_container:
name: "{{ nextcloud_hostname }}"
state: absent
- name: Remove nextcloud volume
docker_volume:
community.docker.docker_volume:
name: "{{ nextcloud_volume_name }}"
state: absent
when: '"nextcloud_volume" in ansible_run_tags'
when: '"nextcloud_volume" in ansible_run_tags'
+4 -4
View File
@@ -1,11 +1,11 @@
- name: "Remove nginx container {{ nginx_hostname }}"
docker_container:
---
- name: Remove nginx container {{ nginx_hostname }}
community.docker.docker_container:
name: "{{ nginx_hostname }}"
state: absent
- name: Remove nginx data dir
file:
ansible.builtin.file:
path: "{{ nginx_data_dir }}"
state: absent
when: '"nginx_data" in ansible_run_tags'
+5 -4
View File
@@ -1,10 +1,11 @@
- name: "Remove node_exporter container {{ node_exporter_hostname }}"
docker_container:
---
- name: Remove node_exporter container {{ node_exporter_hostname }}
community.docker.docker_container:
name: "{{ node_exporter_hostname }}"
state: absent
- name: Remove node_exporter data dir
file:
ansible.builtin.file:
path: "{{ node_exporter_data_dir }}"
state: absent
when: '"node_exporter_data" in ansible_run_tags'
when: '"node_exporter_data" in ansible_run_tags'
+7 -6
View File
@@ -1,16 +1,17 @@
- name: "Remove odoo container {{ odoo_hostname }}"
docker_container:
---
- name: Remove odoo container {{ odoo_hostname }}
community.docker.docker_container:
name: "{{ odoo_hostname }}"
state: absent
- name: "Remove odoo volume {{ odoo_volume_name }}"
docker_volume:
- name: Remove odoo volume {{ odoo_volume_name }}
community.docker.docker_volume:
name: "{{ odoo_volume_name }}"
state: absent
when: '"odoo_volume" in ansible_run_tags'
- name: "Remove odoo data dir {{ odoo_data_dir }}"
file:
- name: Remove odoo data dir {{ odoo_data_dir }}
ansible.builtin.file:
path: "{{ odoo_data_dir }}"
state: absent
when: '"odoo_data" in ansible_run_tags'
+4 -3
View File
@@ -1,8 +1,9 @@
---
- name: Remove odoo scripts
file:
path: "/usr/local/bin/{{ item }}"
ansible.builtin.file:
path: /usr/local/bin/{{ item }}
state: absent
loop:
- odoo-backup
- odoo-restore
- docker-odoo-install
- docker-odoo-install
+3 -2
View File
@@ -1,4 +1,5 @@
- name: "Remove openldap container {{ openldap_hostname }}"
docker_container:
---
- name: Remove openldap container {{ openldap_hostname }}
community.docker.docker_container:
name: "{{ openldap_hostname }}"
state: absent
+5 -4
View File
@@ -1,10 +1,11 @@
- name: "Remove pgadmin container {{ pgadmin_hostname }}"
docker_container:
---
- name: Remove pgadmin container {{ pgadmin_hostname }}
community.docker.docker_container:
name: "{{ pgadmin_hostname }}"
state: absent
- name: Remove pgadmin volume
docker_volume:
community.docker.docker_volume:
name: "{{ pgadmin_volume_name }}"
state: absent
when: '"pgadmin_volume" in ansible_run_tags'
when: '"pgadmin_volume" in ansible_run_tags'
+6 -5
View File
@@ -1,10 +1,11 @@
- name: "Remove postgres container {{ postgres_hostname }}"
docker_container:
---
- name: Remove postgres container {{ postgres_hostname }}
community.docker.docker_container:
name: "{{ postgres_hostname }}"
state: absent
- name: "Remove postgres volume {{ postgres_volume_name }}"
docker_volume:
- name: Remove postgres volume {{ postgres_volume_name }}
community.docker.docker_volume:
name: "{{ postgres_volume_name }}"
state: absent
when: '"postgres_volume" in ansible_run_tags'
when: '"postgres_volume" in ansible_run_tags'
+5 -4
View File
@@ -1,16 +1,17 @@
- name: "Remove prometheus container {{ prometheus_hostname }}"
docker_container:
---
- name: Remove prometheus container {{ prometheus_hostname }}
community.docker.docker_container:
name: "{{ prometheus_hostname }}"
state: absent
- name: Remove prometheus data dir
file:
ansible.builtin.file:
path: "{{ prometheus_data_dir }}"
state: absent
when: '"prometheus_data" in ansible_run_tags'
- name: Remove prometheus volume
docker_volume:
community.docker.docker_volume:
name: "{{ prometheus_volume_name }}"
state: absent
when: '"prometheus_volume" in ansible_run_tags'
+6 -5
View File
@@ -1,10 +1,11 @@
- name: "Remove redis container {{ redis_hostname }}"
docker_container:
---
- name: Remove redis container {{ redis_hostname }}
community.docker.docker_container:
name: "{{ redis_hostname }}"
state: absent
- name: "Remove redis volume {{ redis_volume_name }}"
docker_volume:
- name: Remove redis volume {{ redis_volume_name }}
community.docker.docker_volume:
name: "{{ redis_volume_name }}"
state: absent
when: '"redis_volume" in ansible_run_tags'
when: '"redis_volume" in ansible_run_tags'
+3 -2
View File
@@ -1,12 +1,13 @@
---
- name: Remove restic backup jobs
cron:
ansible.builtin.cron:
name: "{{ item.id }}"
state: absent
loop: "{{ restic_backup_set }}"
when: restic_backup_set is defined
- name: Remove postgres backup jobs
cron:
ansible.builtin.cron:
name: "{{ item.id }}"
state: absent
loop: "{{ postgres_backup_set }}"
+5 -4
View File
@@ -1,10 +1,11 @@
- name: "Remove wordpress container {{ wordpress_hostname }}"
docker_container:
---
- name: Remove wordpress container {{ wordpress_hostname }}
community.docker.docker_container:
name: "{{ wordpress_hostname }}"
state: absent
- name: "Remove wordpress volume {{ wordpress_volume_name }}"
docker_volume:
- name: Remove wordpress volume {{ wordpress_volume_name }}
community.docker.docker_volume:
name: "{{ wordpress_volume_name }}"
state: absent
when: '"wordpress_volume" in ansible_run_tags'
+2 -1
View File
@@ -1,6 +1,7 @@
---
collabora_code_port: 9980
collabora_code_description: Collabora Code
collabora_code_username: admin
collabora_code_password: "{{ vault_collabora_code_password }}"
collabora_code_aliasgroup1: ""
collabora_code_ssl_enable: true
collabora_code_ssl_enable: true
+1
View File
@@ -1,3 +1,4 @@
---
dependencies: # noqa 701
- role: nextcloud
tags:
@@ -1,5 +1,6 @@
- name: "Start {{ role_name }} container {{ collabora_code_hostname }}"
docker_container:
---
- name: Start {{ role_name }} container {{ collabora_code_hostname }}
community.docker.docker_container:
name: "{{ collabora_code_hostname }}"
labels:
description: "{{ collabora_code_description }}"
@@ -10,7 +11,7 @@
password: "{{ collabora_code_password }}"
server_name: "{{ collabora_code_server_name}}"
aliasgroup1: "{{ collabora_code_aliasgroup1 }}"
extra_params: "--o:ssl.enable={{ collabora_code_ssl_enable }}"
extra_params: --o:ssl.enable={{ collabora_code_ssl_enable }}
ports:
- "{{ collabora_code_port }}:9980"
networks:
@@ -19,4 +20,4 @@
log_options:
max-size: "{{ docker_log_max_size }}"
max-file: "{{ docker_log_max_file }}"
tag: "{{ collabora_code_hostname }}|{{ role_name }}"
tag: "{{ collabora_code_hostname }}|{{ role_name }}"
+4 -3
View File
@@ -1,5 +1,6 @@
- name: "Include {{ role_name }} tasks"
include_tasks: "{{ role_name }}.yml"
---
- name: Include {{ role_name }} tasks
ansible.builtin.include_tasks: "{{ role_name }}.yml"
when: collabora_code_image is defined
tags:
- collabora_code
- collabora_code
+3 -2
View File
@@ -1,2 +1,3 @@
commento_description: "Commento"
commento_deny_signups: "false"
---
commento_description: Commento
commento_deny_signups: "false"
+2 -1
View File
@@ -1,5 +1,6 @@
---
dependencies: # noqa 701
- role: postgres
tags:
- postgres
- depends
- depends
+5 -4
View File
@@ -1,5 +1,6 @@
- name: "Start {{ role_name }} container {{ commento_hostname }}"
docker_container:
---
- name: Start {{ role_name }} container {{ commento_hostname }}
community.docker.docker_container:
name: "{{ commento_hostname }}"
labels:
description: "{{ commento_description }}"
@@ -8,7 +9,7 @@
recreate: false
env:
COMMENTO_ORIGIN: "{{ commento_host }}"
COMMENTO_POSTGRES: "postgres://{{ commento_db_user }}:{{ commento_db_password }}@{{ commento_db_hostname }}:5432/commento?sslmode=disable"
COMMENTO_POSTGRES: postgres://{{ commento_db_user }}:{{ commento_db_password }}@{{ commento_db_hostname }}:5432/commento?sslmode=disable
COMMENTO_SMTP_HOST: "{{ commento_smtp_host }}"
COMMENTO_SMTP_PORT: "{{ commento_smtp_port }}"
COMMENTO_SMTP_USERNAME: "{{ commento_smtp_username }}"
@@ -23,4 +24,4 @@
log_options:
max-size: "{{ docker_log_max_size }}"
max-file: "{{ docker_log_max_file }}"
tag: "{{ commento_hostname }}|{{ role_name }}"
tag: "{{ commento_hostname }}|{{ role_name }}"
+4 -3
View File
@@ -1,5 +1,6 @@
- name: "Include {{ role_name }} tasks"
include_tasks: "{{ role_name }}.yml"
---
- name: Include {{ role_name }} tasks
ansible.builtin.include_tasks: "{{ role_name }}.yml"
when: commento_image is defined
tags:
- commento
- commento
+2 -1
View File
@@ -1,2 +1,3 @@
---
coturn_description: Coturn
coturn_data_dir: "/usr/share/{{ coturn_hostname }}"
coturn_data_dir: /usr/share/{{ coturn_hostname }}
Loaded 100 of 452 files, more files were not shown because too many files have changed in this diff. Show more