Compare commits
3 Commits
d297aceb42
...
632abd124d
Author | SHA1 | Date | |
---|---|---|---|
632abd124d | |||
870d7c93c0 | |||
f8f1c2df42 |
@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
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,9 +16,10 @@ 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_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
|
{{ (cinny_user_info is defined and 'uid' in cinny_user_info)
|
||||||
| 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
|
{{ (cinny_user_info is defined and 'group' in cinny_user_info)
|
||||||
| 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 | to_nice_json }}"
|
content: "{{ cinny_config_complete | 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 }}"
|
source: "{{ cinny_container_source | default('pull') }}"
|
||||||
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.exist
|
when: cinny_running_version_st.stat.exists
|
||||||
|
|
||||||
- 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.exist or
|
{{ not cinny_running_version_st.stat.exists or
|
||||||
(cinny_version | version(cinny_running_version, 'gt', version_type='semver'))
|
(cinny_version is 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)
|
||||||
|
@ -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) }}
|
Loading…
x
Reference in New Issue
Block a user