Compare commits
2 Commits
dev
...
0a8ac8bb58
Author | SHA1 | Date | |
---|---|---|---|
0a8ac8bb58
|
|||
fdbf8f1e0d
|
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Deploy and configure cinny
|
|
||||||
hosts: "{{ cinny_hosts | default('cinny') }}"
|
|
||||||
become: "{{ cinny_become | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- role: finallycoffee.matrix.cinny
|
|
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Deploy and configure element
|
|
||||||
hosts: "{{ element_hosts | default('element') }}"
|
|
||||||
become: "{{ element_become | default(true) }}"
|
|
||||||
roles:
|
|
||||||
- role: finallycoffee.matrix.element
|
|
@ -1,5 +1,4 @@
|
|||||||
---
|
---
|
||||||
cinny_testvar: abc
|
|
||||||
cinny_config_complete: >-
|
cinny_config_complete: >-
|
||||||
{{ cinny_config | default({})
|
{{ cinny_config | default({})
|
||||||
| combine(cinny_default_config | default({})) }}
|
| combine(cinny_default_config | default({})) }}
|
@ -16,11 +16,9 @@ cinny_container_restart_policy: >-
|
|||||||
{{ (cinny_deployment_method == 'docker')
|
{{ (cinny_deployment_method == 'docker')
|
||||||
| ternary('unless-stopped',
|
| ternary('unless-stopped',
|
||||||
(cinny_deployment_method == 'podman' |
|
(cinny_deployment_method == 'podman' |
|
||||||
ternary('on-failure', 'always')))
|
ternary('on-failure', 'always'))
|
||||||
}}
|
}}
|
||||||
cinny_container_source: pull
|
|
||||||
|
|
||||||
cinny_container_user: "{{ cinny_host_uid }}"
|
|
||||||
cinny_container_full_volumes: >-
|
cinny_container_full_volumes: >-
|
||||||
{{ cinny_container_default_volumes
|
{{ cinny_container_default_volumes
|
||||||
+ cinny_container_volumes | default([]) }}
|
+ cinny_container_volumes | default([]) }}
|
@ -11,8 +11,8 @@ cinny_config_path: "{{ cinny_base_path }}/config"
|
|||||||
cinny_config_file: "{{ cinny_config_path }}/config.json"
|
cinny_config_file: "{{ cinny_config_path }}/config.json"
|
||||||
|
|
||||||
cinny_host_uid: >-
|
cinny_host_uid: >-
|
||||||
{{ (cinny_user_info is defined and 'uid' in cinny_user_info)
|
{{ cinny_user_info is defined
|
||||||
| ternary(cinny_user_info.uid, cinny_user) }}
|
| ternary(cinny_user_info.uid, cinny_user) }}
|
||||||
cinny_host_gid: >-
|
cinny_host_gid:
|
||||||
{{ (cinny_user_info is defined and 'group' in cinny_user_info)
|
{{ cinny_user_info is defined
|
||||||
| ternary(cinny_user_info.group, cinny_user) }}
|
| ternary(cinny_user_info.group, cinny_user) }}
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
- name: Ensure config file is {{ cinny_state }}
|
- name: Ensure config file is {{ cinny_state }}
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ cinny_config_complete | to_nice_json }}"
|
content: "{{ cinny_config | to_nice_json }}"
|
||||||
dest: "{{ cinny_config_file }}"
|
dest: "{{ cinny_config_file }}"
|
||||||
owner: "{{ cinny_host_uid }}"
|
owner: "{{ cinny_host_uid }}"
|
||||||
group: "{{ cinny_host_gid }}"
|
group: "{{ cinny_host_gid }}"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ cinny_container_image }}"
|
name: "{{ cinny_container_image }}"
|
||||||
state: "{{ cinny_state }}"
|
state: "{{ cinny_state }}"
|
||||||
source: "{{ cinny_container_source | default('pull') }}"
|
source: "{{ cinny_container_source }}"
|
||||||
force_source: "{{ cinny_container_image_tag | default(false, true) }}"
|
force_source: "{{ cinny_container_image_tag | default(false, true) }}"
|
||||||
|
|
||||||
- name: Ensure container '{{ cinny_container_name }}' is {{ cinny_state }}
|
- name: Ensure container '{{ cinny_container_name }}' is {{ cinny_state }}
|
||||||
|
@ -8,13 +8,13 @@
|
|||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
path: "{{ cinny_running_version_file }}"
|
path: "{{ cinny_running_version_file }}"
|
||||||
register: cinny_running_version_info
|
register: cinny_running_version_info
|
||||||
when: cinny_running_version_st.stat.exists
|
when: cinny_running_version_st.stat.exist
|
||||||
|
|
||||||
- name: Extract running cinny version
|
- name: Extract running cinny version
|
||||||
set_fact:
|
set_fact:
|
||||||
cinny_is_update: >-
|
cinny_is_update: >-
|
||||||
{{ not cinny_running_version_st.stat.exists or
|
{{ not cinny_running_version_st.stat.exist or
|
||||||
(cinny_version is version(cinny_running_version, 'gt', version_type='semver')) }}
|
(cinny_version | version(cinny_running_version, 'gt', version_type='semver'))
|
||||||
vars:
|
vars:
|
||||||
cinny_running_version: >-
|
cinny_running_version: >-
|
||||||
{{ (cinny_running_version_info is defined)
|
{{ (cinny_running_version_info is defined)
|
||||||
|
@ -6,10 +6,10 @@ Deploy the [element web-app](https://element.io/)
|
|||||||
using the following supported methods by setting `element_deployment_method` to it:
|
using the following supported methods by setting `element_deployment_method` to it:
|
||||||
|
|
||||||
- [`docker` (docs)](docs/docker.md) (default)
|
- [`docker` (docs)](docs/docker.md) (default)
|
||||||
- `podman`
|
|
||||||
|
|
||||||
Planned deployment methods:
|
Planned deployment methods:
|
||||||
|
|
||||||
|
- `podman`
|
||||||
- `tarball`
|
- `tarball`
|
||||||
- `nginx`
|
- `nginx`
|
||||||
- `apache2`
|
- `apache2`
|
||||||
|
@ -13,6 +13,6 @@ element_config_file: "{{ element_config_path }}/config.json"
|
|||||||
element_host_uid: >-
|
element_host_uid: >-
|
||||||
{{ element_user_info is defined
|
{{ element_user_info is defined
|
||||||
| ternary(element_user_info.uid, element_user) }}
|
| ternary(element_user_info.uid, element_user) }}
|
||||||
element_host_gid: >-
|
element_host_gid:
|
||||||
{{ element_user_info is defined
|
{{ element_user_info is defined
|
||||||
| ternary(element_user_info.group, element_user) }}
|
| ternary(element_user_info.group, element_user) }}
|
@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensure container image '{{ element_container_image }}' is {{ element_state }} locally
|
|
||||||
containers.podman.podman_image:
|
|
||||||
name: "{{ element_container_image }}"
|
|
||||||
state: "{{ element_state }}"
|
|
||||||
pull: "{{ element_container_source == 'pull' }}"
|
|
||||||
force: "{{ element_container_image_tag | default(false, true) }}"
|
|
||||||
|
|
||||||
- name: Ensure container '{{ element_container_name }}' is {{ element_state }}
|
|
||||||
containers.podman.podman_container:
|
|
||||||
name: "{{ element_container_name }}"
|
|
||||||
image: "{{ element_container_image }}"
|
|
||||||
state: "{{ (element_state == 'present') | ternary('started', 'absent') }}"
|
|
||||||
env: "{{ element_container_env | default(omit) }}"
|
|
||||||
user: "{{ element_container_user }}"
|
|
||||||
ports: "{{ element_container_ports | default(omit) }}"
|
|
||||||
labels: "{{ element_container_labels | default(omit) }}"
|
|
||||||
volumes: "{{ element_container_full_volumes }}"
|
|
||||||
network: "{{ element_container_networks | default(omit) }}"
|
|
||||||
hostname: "{{ element_container_hostname | default(omit) }}"
|
|
||||||
etc_hosts: "{{ element_container_etc_hosts | default(omit) }}"
|
|
||||||
restart_policy: "{{ element_container_restart_policy }}"
|
|
@ -5,4 +5,3 @@ element_state:
|
|||||||
|
|
||||||
element_deployment_methods:
|
element_deployment_methods:
|
||||||
- docker
|
- docker
|
||||||
- podman
|
|
||||||
|
Reference in New Issue
Block a user