Skip to content

Commit

Permalink
Photoprism: Go rootless, cleanup group
Browse files Browse the repository at this point in the history
  • Loading branch information
owine committed Aug 8, 2023
1 parent 9df23bf commit ec86f93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
5 changes: 3 additions & 2 deletions roles/photoprism/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ photoprism_docker_envs_default:
PHOTOPRISM_SITE_DESCRIPTION: "Trying out PhotoPrism!"
PHOTOPRISM_SITE_AUTHOR: "{{ user.name }}"
PHOTOPRISM_INIT: "gpu tensorflow"
PHOTOPRISM_UID: "{{ uid }}"
PHOTOPRISM_GID: "{{ gid }}"
photoprism_docker_envs_custom: {}
photoprism_docker_envs: "{{ photoprism_docker_envs_default
| combine(photoprism_docker_envs_custom) }}"
Expand Down Expand Up @@ -176,3 +174,6 @@ photoprism_docker_restart_policy: unless-stopped

# State
photoprism_docker_state: started

# User
photoprism_docker_user: "{{ uid }}:{{ gid }}"
11 changes: 2 additions & 9 deletions roles/photoprism/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,13 @@
state: present
ignore_errors: true

- name: Permissions | Create photoprism group
- name: Permissions | Delete photoprism group
ansible.builtin.group:
name: photoprism
state: present
state: absent
gid: 1500
ignore_errors: true

- name: Permissions | Add to photoprism group
ansible.builtin.user:
name: "{{ user.name }}"
groups: photoprism
append: yes
ignore_errors: true

- name: Add DNS record
ansible.builtin.include_tasks: "{{ resources_tasks_path }}/dns/tasker.yml"
vars:
Expand Down

0 comments on commit ec86f93

Please sign in to comment.