fix(element): user id and primary group id, start containers with uid=0
This commit is contained in:
parent
3ac177e04b
commit
be6f7c1cc2
@ -10,9 +10,9 @@ element_dist_path: "{{ element_source_path }}/dist"
|
||||
element_config_path: "{{ element_base_path }}/config"
|
||||
element_config_file: "{{ element_config_path }}/config.json"
|
||||
|
||||
element_host_uid: >-
|
||||
{{ element_user_info is defined
|
||||
element_host_uid: >-2
|
||||
{{ ((element_user_info is defined) and ('uid' in element_user_info))
|
||||
| ternary(element_user_info.uid, element_user) }}
|
||||
element_host_gid: >-
|
||||
{{ element_user_info is defined
|
||||
element_host_gid: >-2
|
||||
{{ ((element_user_info is defined) and ('uid' in element_user_info))
|
||||
| ternary(element_user_info.group, element_user) }}
|
||||
|
@ -23,7 +23,7 @@
|
||||
image: "{{ element_container_image }}"
|
||||
state: "{{ (element_state == 'present') | ternary('started', 'absent') }}"
|
||||
env: "{{ element_container_env | default(omit) }}"
|
||||
user: "{{ element_container_user }}"
|
||||
user: "{{ element_container_user | default(omit) }}"
|
||||
ports: "{{ element_container_ports | default(omit) }}"
|
||||
labels: "{{ element_container_labels | default(omit) }}"
|
||||
volumes: "{{ element_container_full_volumes }}"
|
||||
|
@ -12,7 +12,7 @@
|
||||
image: "{{ element_container_image }}"
|
||||
state: "{{ (element_state == 'present') | ternary('started', 'absent') }}"
|
||||
env: "{{ element_container_env | default(omit) }}"
|
||||
user: "{{ element_container_user }}"
|
||||
user: "{{ element_container_user | default(omit) }}"
|
||||
ports: "{{ element_container_ports | default(omit) }}"
|
||||
labels: "{{ element_container_labels | default(omit) }}"
|
||||
volumes: "{{ element_container_full_volumes }}"
|
||||
|
Loading…
Reference in New Issue
Block a user