Change permissions of service systemd files

This commit is contained in:
Wojciech Kozlowski 2022-12-17 00:39:25 +01:00
parent 1fd33c56d3
commit 66e97d7df6
7 changed files with 21 additions and 21 deletions

View File

@ -34,7 +34,7 @@
ansible.builtin.template: ansible.builtin.template:
src: "./systemd/{{ item }}.j2" src: "./systemd/{{ item }}.j2"
dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}" dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}"
mode: 0644 mode: 0600
loop: loop:
- "pod-cloud.service" - "pod-cloud.service"
- "container-cloud-nginx.service" - "container-cloud-nginx.service"
@ -65,8 +65,8 @@
- name: "restart the service" - name: "restart the service"
ansible.builtin.systemd: ansible.builtin.systemd:
name: "pod-{{ services_service_name }}.service" name: "pod-{{ services_service_name }}.service"
state: restarted state: "restarted"
scope: user scope: "user"
when: when:
(services_deploy_cloud_config_files.changed or (services_deploy_cloud_config_files.changed or
services_deploy_cloud_nextcloud_files.changed or services_deploy_cloud_nextcloud_files.changed or

View File

@ -21,7 +21,7 @@
ansible.builtin.template: ansible.builtin.template:
src: "./systemd/{{ item }}.j2" src: "./systemd/{{ item }}.j2"
dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}" dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}"
mode: 0644 mode: 0600
loop: loop:
- "pod-database.service" - "pod-database.service"
- "container-database-postgres.service" - "container-database-postgres.service"
@ -50,8 +50,8 @@
- name: "restart the service" - name: "restart the service"
ansible.builtin.systemd: ansible.builtin.systemd:
name: "pod-{{ services_service_name }}.service" name: "pod-{{ services_service_name }}.service"
state: restarted state: "restarted"
scope: user scope: "user"
when: when:
(services_deploy_database_password_file.changed or (services_deploy_database_password_file.changed or
services_deploy_database_systemd_files.changed) and services_deploy_database_systemd_files.changed) and

View File

@ -14,7 +14,7 @@
ansible.builtin.template: ansible.builtin.template:
src: "./systemd/{{ item }}.j2" src: "./systemd/{{ item }}.j2"
dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}" dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}"
mode: 0644 mode: 0600
loop: loop:
- "pod-git.service" - "pod-git.service"
- "container-git-gitea.service" - "container-git-gitea.service"
@ -43,8 +43,8 @@
- name: "restart the service" - name: "restart the service"
ansible.builtin.systemd: ansible.builtin.systemd:
name: "pod-{{ services_service_name }}.service" name: "pod-{{ services_service_name }}.service"
state: restarted state: "restarted"
scope: user scope: "user"
when: when:
services_deploy_git_systemd_files.changed and services_deploy_git_systemd_files.changed and
not services_deploy_git_service_start.changed not services_deploy_git_service_start.changed

View File

@ -32,7 +32,7 @@
ansible.builtin.template: ansible.builtin.template:
src: "./systemd/{{ item }}.j2" src: "./systemd/{{ item }}.j2"
dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}" dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}"
mode: 0644 mode: 0600
loop: loop:
- "pod-lrproxy.service" - "pod-lrproxy.service"
- "container-lrproxy-nginx.service" - "container-lrproxy-nginx.service"
@ -97,8 +97,8 @@
- name: "restart the service" - name: "restart the service"
ansible.builtin.systemd: ansible.builtin.systemd:
name: "pod-{{ services_service_name }}.service" name: "pod-{{ services_service_name }}.service"
state: restarted state: "restarted"
scope: user scope: "user"
when: when:
(services_deploy_lrproxy_config_files.changed or (services_deploy_lrproxy_config_files.changed or
services_deploy_lrproxy_systemd_files.changed or services_deploy_lrproxy_systemd_files.changed or

View File

@ -14,7 +14,7 @@
ansible.builtin.template: ansible.builtin.template:
src: "./systemd/{{ item }}.j2" src: "./systemd/{{ item }}.j2"
dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}" dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}"
mode: 0644 mode: 0600
loop: loop:
- "pod-notes.service" - "pod-notes.service"
- "container-notes-joplin.service" - "container-notes-joplin.service"
@ -44,8 +44,8 @@
- name: "restart the service" - name: "restart the service"
ansible.builtin.systemd: ansible.builtin.systemd:
name: "pod-{{ services_service_name }}.service" name: "pod-{{ services_service_name }}.service"
state: restarted state: "restarted"
scope: user scope: "user"
when: when:
services_deploy_notes_systemd_files.changed and services_deploy_notes_systemd_files.changed and
not services_deploy_notes_service_start.changed not services_deploy_notes_service_start.changed

View File

@ -32,7 +32,7 @@
ansible.builtin.template: ansible.builtin.template:
src: "./systemd/{{ item }}.j2" src: "./systemd/{{ item }}.j2"
dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}" dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}"
mode: 0644 mode: 0600
loop: loop:
- "pod-rproxy.service" - "pod-rproxy.service"
- "container-rproxy-nginx.service" - "container-rproxy-nginx.service"
@ -76,8 +76,8 @@
- name: "restart the service" - name: "restart the service"
ansible.builtin.systemd: ansible.builtin.systemd:
name: "pod-{{ services_service_name }}.service" name: "pod-{{ services_service_name }}.service"
state: restarted state: "restarted"
scope: user scope: "user"
when: when:
(services_deploy_rproxy_config_files.changed or (services_deploy_rproxy_config_files.changed or
services_deploy_rproxy_systemd_files.changed or services_deploy_rproxy_systemd_files.changed or

View File

@ -36,7 +36,7 @@
ansible.builtin.template: ansible.builtin.template:
src: "./systemd/{{ item }}.j2" src: "./systemd/{{ item }}.j2"
dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}" dest: "{{ services_service_user_home }}/.config/systemd/user/{{ item }}"
mode: 0644 mode: 0600
loop: loop:
- "pod-www.service" - "pod-www.service"
- "container-www-nginx.service" - "container-www-nginx.service"
@ -79,8 +79,8 @@
- name: "restart the service" - name: "restart the service"
ansible.builtin.systemd: ansible.builtin.systemd:
name: "pod-{{ services_service_name }}.service" name: "pod-{{ services_service_name }}.service"
state: restarted state: "restarted"
scope: user scope: "user"
when: when:
services_deploy_www_systemd_files.changed and services_deploy_www_systemd_files.changed and
not services_deploy_www_service_start.changed not services_deploy_www_service_start.changed