Update to 2022-08-29 11:00

This commit is contained in:
Daniel Berteaud 2022-08-29 11:00:17 +02:00
parent f17ab3267b
commit b213df4df4
30 changed files with 282 additions and 29 deletions

View File

@ -3,10 +3,10 @@
ampache_id: "1"
ampache_manage_upgrade: True
ampache_version: '5.4.1'
ampache_version: '5.5.1'
ampache_config_version: 62
ampache_zip_url: https://github.com/ampache/ampache/releases/download/{{ ampache_version }}/ampache-{{ ampache_version }}_all.zip
ampache_zip_sha256: 867a87d73a16386ff95d9b6474828917f9b03c23ec49d8f22c09ccbad987eb7b
ampache_zip_sha256: 3e37839058c263be990915759eecab9b5da3ec324638a7ff7d8094516f56a85c
ampache_root_dir: /opt/ampache_{{ ampache_id }}

View File

@ -7,7 +7,7 @@
tags: always
- include_tasks: archive_pre.yml
when: cni_install_mode == 'upgrade'
when: cni_install_mode | default('none') == 'upgrade'
tags: always
- include_tasks: install.yml
@ -17,7 +17,7 @@
tags: always
- include_tasks: archive_post.yml
when: cni_install_mode == 'upgrade'
when: cni_install_mode | default('none') == 'upgrade'
tags: always
- include_tasks: cleanup.yml

View File

@ -1,11 +1,11 @@
---
# Version of consul to deploy
consul_version: 1.12.3
consul_version: 1.13.1
# URL from where the consul archive will be downloaded
consul_archive_url: https://releases.hashicorp.com/consul/{{ consul_version }}/consul_{{ consul_version }}_linux_amd64.zip
# Expected sha256 of the archive
consul_archive_sha256: 620a47cfba34bdf918b4c3238d22f6318b29403888cfd927c6006a4ac1b1c9f6
consul_archive_sha256: 7f8f69b631114e0a021b602a1975e0221912b8b33ef20ead1589d6f6581c5579
# user account under which consul will run (will be created if needed)
consul_user: consul

View File

@ -8,7 +8,7 @@
command: "{{ consul_root_dir }}/bin/consul snapshot save {{ consul_root_dir }}/archives/{{ consul_current_version }}/consul.snap"
args:
creates: "{{ consul_root_dir }}/archives/{{ consul_current_version }}/consul.snap"
failed_when: False # If consul is not running, it'll fail, just continue
when: consul_conf.server
environment:
CONSUL_TOKEN: "{{ consul_mgm_token | default(omit) }}"
tags: consul

View File

@ -5,3 +5,7 @@
- include_tasks: install.yml
tags: always
- include_tasks: iptables.yml
when: iptables_manage | default(True)
tags: always

View File

@ -4,3 +4,4 @@ drbd_packages:
- kmod-drbd90
- drbd-utils
- drbd-udev
- drbd-bash-completion

View File

@ -0,0 +1,23 @@
---
# Port on which the controller will listen for plain (http) requests
linctl_api_port: 3370
# List of IP/CIDR for which the API port will be opened
linctl_api_src_ip: []
# List of linstor controllers. Default is only localhost:3370 but when using HA you can define
# a list of controllers to try, the first answering will be used
linctl_controllers:
- http://localhost:3370
# When HA is enabled, ansible will not try to start or enabled the service
# As this will be handled by drbd-reactor
# It'll also restart the service on config change only if the service is already running
linctl_ha: False
# When running HA, set the name of the resource which holds the controller data
linctl_ha_res: linstor_db
# If set, and linctl_ha is True, this IP will be configured on the current active node
# linctl_ha_ip: 10.99.5.23

View File

@ -0,0 +1,8 @@
---
- name: restart linstor-controller
service: name=linstor-controller state=restarted
# Only restart if the service wasn't just started, and if either HA is not used, or the service was running (so it's the current active instance)
when:
- not linctl_started.changed
- not linctl_ha or linctl_services.ansible_facts.services['linstor-controller.service'] is defined and linctl_services.ansible_facts.services['linstor-controller.service'].state == 'started'

View File

@ -0,0 +1,4 @@
---
dependencies:
- role: drbd_reactor

View File

@ -0,0 +1,26 @@
---
- name: Deploy linstor-controller conf
template: src=linstor.toml.j2 dest=/etc/linstor/linstor.toml mode=640
notify: restart linstor-controller
tags: drbd
- name: Deploy linstor-client configuration
template: src=linstor-client.conf.j2 dest=/etc/linstor/linstor-client.conf
tags: drbd
- name: Setup logrotate
template: src=logrotate.j2 dest=/etc/logrotate.d/linstor-controller
tags: drbd
- name: Remove old reactor conf
file: path=/etc/drbd-reactor.d/linstor_db.toml state=absent
notify: restart drbd-reactor
tags: drbd
- when: linctl_ha
name: Configure the drbd-reactor promoter
template: src=drbd-reactor.toml.j2 dest=/etc/drbd-reactor.d/linstor-controller.toml
notify: restart drbd-reactor
tags: drbd

View File

@ -0,0 +1,17 @@
---
- name: Create conf dir
file: path=/etc/linstor state=directory
tags: drbd
#- name: Create data directory
# file: path=/var/lib/linstor state=directory owner=root group=linstor-controller mode=u=rwX,g=rwX,o=- recurse=True
# tags: drbd
- name: Create systemd unit snippet dir
file: path=/etc/systemd/system/linstor-controller.service.d state=directory
tags: drbd
#- name: Set permission on log dir
# file: path=/var/log/linstor-controller state=directory owner=root group=linstor-controller mode=u=rwX,g=rwX,o=- recurse=True
# tags: drbd

View File

@ -0,0 +1,16 @@
---
# Load distribution specific variables
- include_vars: "{{ item }}"
with_first_found:
- "{{ role_path }}/vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
- "{{ role_path }}/vars/{{ ansible_distribution }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family }}.yml"
tags: drbd
- name: Check the state of the service
service_facts:
register: linctl_service
tags: drbd

View File

@ -0,0 +1,44 @@
---
- name: Install packages
package: name={{ linctl_packages }}
tags: drbd
- name: Custimize systemd unit
copy:
content: |
[Service]
#User=linstor-controller
#Group=linstor-controller
PrivateDevices=yes
ProtectSystem=full
ProtectHome=yes
NoNewPrivileges=yes
SyslogIdentifier=linstor-controller
Restart=on-failure
StartLimitInterval=0
RestartSec=15
dest: /etc/systemd/system/linstor-controller.service.d/99-ansible.conf
notify: restart linstor-controller
register: linctl_unit
tags: drbd
- name: Install mount unit
copy:
content: |
[Unit]
Description=Filesystem for the LINSTOR controller
[Mount]
# you can use the minor like /dev/drbdX or the udev symlink
What=/dev/drbd/by-res/{{ linctl_ha_res }}/0
Where=/var/lib/linstor
dest: /etc/systemd/system/var-lib-linstor.mount
register: linctl_data_unit
when: linctl_ha
tags: drbd
- name: Reload systemd
systemd: daemon_reload=True
when: linctl_unit.changed or (linctl_data_unit is defined and linctl_data_unit.changed)
tags: drbd

View File

@ -0,0 +1,9 @@
---
- name: Handle API ports
iptables_raw:
name: linctl_api_port
state: "{{ (linctl_api_src_ip | length > 0) | ternary('present','absent') }}"
rules: "-A INPUT -m state --state NEW -p tcp --dport {{ linctl_api_port }} -s {{ linctl_api_src_ip | join(',') }} -j ACCEPT"
tags: firewall,drbd

View File

@ -0,0 +1,26 @@
---
- include_tasks: facts.yml
tags: always
#- include_tasks: user.yml
# tags: always
- include_tasks: directories.yml
tags: always
- include_tasks: install.yml
tags: always
#- include_tasks: directories.yml
# tags: always
- include_tasks: conf.yml
tags: always
- include_tasks: iptables.yml
when: iptables_manage | default(True)
tags: always
- include_tasks: services.yml
tags: always

View File

@ -0,0 +1,16 @@
---
- when: not linctl_ha
name: Start and enable the service
service: name=linstor-controller state=started enabled=True
register: linctl_started
tags: drbd
- when: linctl_ha
block:
- name: Ensure the service is disabled and managed by drbd-reactor
service: name=linstor-controller enabled=False
- name: Ensure the data mount unit is disabled
systemd: name=var-lib-linstor.mount enabled=False
tags: drbd

View File

@ -0,0 +1,9 @@
---
- name: Create linstor-controller user
user:
name: linstor-controller
system: True
shell: /sbin/nologin
home: /var/lib/linstor
tags: drbd

View File

@ -0,0 +1,13 @@
[[promoter]]
id = "{{ linctl_ha_res }}"
[promoter.resources.{{ linctl_ha_res }}]
start = [
{% if linctl_ha_ip is defined %}
"ocf:heartbeat:IPaddr2 service_ip cidr_netmask=32 ip={{ linctl_ha_ip }}",
{% endif %}
"var-lib-linstor.mount",
"linstor-controller.service"
]
stop-services-on-exit = true

View File

@ -0,0 +1,2 @@
[global]
controllers={{ linctl_controllers | join(',') }}

View File

@ -0,0 +1,16 @@
[db]
user = "linstor"
password = "linstor"
connection_url = "jdbc:h2:/var/lib/linstor/linstordb"
[http]
enabled = true
listen_addr = "0.0.0.0"
port = {{ linctl_api_port }}
[logging]
level = "info"
linstor_level = "info"
rest_access_log_path = "/var/log/linstor-controller/rest-access.log"
rest_access_log_mode = "APPEND"

View File

@ -0,0 +1,8 @@
/var/log/linstor/rest-access.log {
daily
rotate 180
compress
notifempty
missingok
copytruncate
}

View File

@ -0,0 +1,5 @@
---
linctl_packages:
- linstor-controller
- linstor-client

View File

@ -15,9 +15,5 @@ linsat_nfs_src_ip: []
# HA iSCSI Service
linsat_iscsi_src_ip: []
# Version of linstor-gateway to install
linsat_gateway_version: 0.13.1
# URL where linstor-gateway will be downloaded
linsat_gateway_url: https://github.com/LINBIT/linstor-gateway/releases/download/v{{ linsat_gateway_version }}/linstor-gateway-linux-amd64
# Expected sha256 of the binary
linsat_gateway_sha256: 83d4d13154caeee79a0bec01db4a571cc417301fc001eb0ee9a6210279201934
# List of resources to keep (and not delete/regenerate) on start. Usefull for the HA controller
linsat_keep_res: [ "{{ linctl_ha_res | default('linstor_db') }}" ]

View File

@ -8,7 +8,14 @@
copy:
content: |
[Service]
Type=notify
Environment=LS_KEEP_RES={{ linsat_keep_res | join(',') }}
Restart=on-failure
StartLimitInterval=0
RestartSec=30
PrivateTmp=yes
ProtectHome=yes
ProtectSystem=full
SyslogIdentifier=linstor-satellite
dest: /etc/systemd/system/linstor-satellite.service.d/99-ansible.conf
notify: restart linstor-satellite
register: linsat_unit

View File

@ -1,6 +1,6 @@
[linstor]
controllers = [
{% for url in linsat_controllers_url %}
"{{ url }}"
"{{ url }}",
{% endfor %}
]

View File

@ -3,3 +3,6 @@
linsat_packages:
- linstor-satellite
- lvm2
- cryptsetup
- vdo
- kmod-kvdo

View File

@ -1,15 +1,15 @@
---
# Version to deploy
metabase_version: 0.43.4
metabase_version: 0.44.1
# URL to fetch the jar
metabase_jar_url: https://downloads.metabase.com/v{{ metabase_version }}/metabase.jar
# Expected sha256 of the jar
metabase_jar_sha256: c89644d013eced830fc02d1169b88708fc2105089b356f1c988875b05882c189
metabase_jar_sha256: 4c842b9b374b0ffa7031b7757722e1dddd9b6aebbb5afe82d82b6eb9730d3791
# When building from source
metabase_archive_url: https://github.com/metabase/metabase/archive/refs/tags/v{{ metabase_version }}.tar.gz
# Expected sha256 of the archive
metabase_archive_sha256: 77ff4777f994675ab82756df2eca041736eb5596afa84b33120cb9a300c7690b
metabase_archive_sha256: 522fb5a92234fb6bc1ed46819523271c51d4e3d2c13fa5230430cff3802d0ff1
# Should ansible handle upgrades ? If set to false, only the initial install (and the config) will be handled
metabase_manage_upgrade: True

View File

@ -1,11 +1,11 @@
---
# Version to install
miniflux_version: 2.0.37
miniflux_version: 2.0.38
# URL of the binary to install
miniflux_bin_url: https://github.com/miniflux/v2/releases/download/{{ miniflux_version }}/miniflux-linux-amd64
# Expected sha256 of the binary
miniflux_bin_sha256: d4f6e63cbeca895181e1c47180c70a75a0dedb636ed2a558d44dc26260557cba
miniflux_bin_sha256: 310501e1fabd103607bda145874e7052271fe2028f628bbddefb3af86798b46f
# Should ansible handle upgrades ? If false, only initial install will be done
miniflux_manage_upgrade: True

View File

@ -10,7 +10,7 @@ pga_src_ip: []
# Root dir where the app will be installed
pga_root_dir: /opt/pgadmin4_{{ pga_id }}
# Version to deploy
pga_version: '6.12'
pga_version: '6.13'
# When pg_auth is an empty list, pgAdmin will be in single user mode
# You can set it to a list, eg

View File

@ -217,14 +217,14 @@
file: path=/var/lib/spamassassin state=directory
tags: pmg
- name: Download fishtank feed
get_url:
url: https://data.phishtank.com/data/online-valid.csv
dest: /var/lib/spamassassin/phishtank.txt
notify: reload pmg-smtp-filter
environment:
- https_proxy: "{{ system_proxy | default('') }}"
tags: pmg
#- name: Download fishtank feed
# get_url:
# url: https://data.phishtank.com/data/online-valid.csv
# dest: /var/lib/spamassassin/phishtank.txt
# notify: reload pmg-smtp-filter
# environment:
# - https_proxy: "{{ system_proxy | default('') }}"
# tags: pmg
- name: Download openphish feed
get_url: