move from docker to podman

wikijs: bump to v2.5.283, helm chart v2.2.20
This commit is contained in:
ace 2022-05-24 12:34:39 +03:00
parent fbf3ae07e5
commit 41da1d8fbc
No known key found for this signature in database
GPG Key ID: 32989872B72276A0
7 changed files with 71 additions and 1 deletions

View File

@ -60,7 +60,7 @@ rspamd_version: 0.2.0
pypiserver_version: 2.3.0
# WikiJS
wikijs_version: 2.2.19
wikijs_version: 2.2.20
# PeerTube
peertube_version: 0.1.8

View File

@ -0,0 +1,52 @@
---
- name: Create configuration dir for {{ ddclient_namespace }}
file:
name: "/opt/{{ ddclient_namespace }}"
state: directory
- name: Copy ddclient configuration for {{ ddclient_namespace }}
copy:
dest: "/opt/{{ ddclient_namespace }}/ddclient.conf"
content: "{{ ddclient_conf }}"
notify: restart docker ddclient
- name: Copy Kvps.key for {{ ddclient_namespace }}
copy:
dest: "/opt/{{ ddclient_namespace }}/Kvps.key"
content: "{{ ddclient_tsig_public_key_base64 | b64decode }}"
notify: restart podman ddclient
- name: Copy Kvps.private for {{ ddclient_namespace }}
copy:
dest: "/opt/{{ ddclient_namespace }}/Kvps.private"
content: "{{ ddclient_tsig_private_key_base64 | b64decode }}"
notify: restart podman ddclient
- name: Start ddclient with podman for {{ ddclient_namespace }}
containers.podman.podman_container:
name: "{{ ddclient_container_name }}"
hostname: "{{ ddclient_container_name }}"
network: "{{ ddclient_network_mode }}"
image: "{{ ddclient_container_registry }}/{{ ddclient_image_name }}:{{ ddclient_image_tag }}"
state: present
volumes:
- "/opt/{{ ddclient_namespace }}/ddclient.conf:/config/ddclient.conf"
- "/opt/{{ ddclient_namespace }}/Kvps.key:/config/Kvps.key"
- "/opt/{{ ddclient_namespace }}/Kvps.private:/config/Kvps.private"
- name: Generate container systemd unit
shell: "podman generate systemd {{ ddclient_container_name }}"
register: ddclient_systemd_unit
changed_when: False
- name: Create ddclient systemd unit
copy:
dest: "/etc/systemd/system/{{ ddclient_systemd_unit_name }}"
content: "{{ ddclient_systemd_unit.stdout | regex_replace('^#.*', multiline=True) | trim }}"
- name: Enable ddclient systemd unit
ansible.builtin.systemd:
name: "{{ ddclient_systemd_unit_name }}"
enabled: yes
state: started
daemon_reload: yes

1
roles/podman/README.md Normal file
View File

@ -0,0 +1 @@
Install podman.

View File

@ -0,0 +1,2 @@
---
podman_version: "{{ '1.6.4' if ansible_facts['distribution_major_version'] == '7' else '4.0.2' if ansible_facts['distribution_major_version'] == '8' }}"

View File

@ -0,0 +1,7 @@
---
galaxy_info:
description: Podman
galaxy_tags:
- podman
dependencies: []

View File

@ -0,0 +1,5 @@
---
- name: Ensure podman {{ podman_version }} installed
yum:
name: "podman-{{ podman_version }}"
state: present

View File

@ -0,0 +1,3 @@
---
- name: Include podman install
include_tasks: "{{ ansible_facts['os_family'] }}.yaml"