Skip to content

Commit

Permalink
add hooks.d tag to hooks tasks
Browse files Browse the repository at this point in the history
like in 42.common
  • Loading branch information
FreekBes committed Jul 10, 2024
1 parent 76d00bc commit e5d5673
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tasks/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
- 'greeter-show-manual-login=true'

- name: Copy display-setup hook script
tags: [codam.webgreeter, codam.webgreeter.setup]
tags: [codam.webgreeter, codam.webgreeter.setup, hooks.d]
become: true
template:
src: usr/share/42/scripts/hook-display-setup.sh.j2
Expand All @@ -77,7 +77,7 @@
mode: '0500'

- name: Enable display-setup hook in lightdm
tags: [codam.webgreeter, codam.webgreeter.setup]
tags: [codam.webgreeter, codam.webgreeter.setup, hooks.d]
become: true
lineinfile:
path: /etc/lightdm/lightdm.conf
Expand All @@ -87,7 +87,7 @@
regexp: '^#?display-setup-script='

- name: Copy greeter-setup hook script
tags: [codam.webgreeter, codam.webgreeter.setup]
tags: [codam.webgreeter, codam.webgreeter.setup, hooks.d]
become: true
template:
src: usr/share/42/scripts/hook-greeter-setup.sh.j2
Expand All @@ -97,7 +97,7 @@
mode: '0500'

- name: Enable greeter-setup hook in lightdm
tags: [codam.webgreeter, codam.webgreeter.setup]
tags: [codam.webgreeter, codam.webgreeter.setup, hooks.d]
become: true
lineinfile:
path: /etc/lightdm/lightdm.conf
Expand All @@ -107,7 +107,7 @@
regexp: '^#?greeter-setup-script='

- name: Add user uncaching to logout hooks
tags: [codam.webgreeter, codam.webgreeter.setup]
tags: [codam.webgreeter, codam.webgreeter.setup, hooks.d]
become: true
copy:
src: usr/share/42/scripts/hooks.d/logout.d/10-dbus.sh
Expand All @@ -117,13 +117,13 @@
mode: '0500'

- name: Find the hook-logout script used in hooks.d/logout.d (ending in hook-logout.sh)
tags: [codam.webgreeter, codam.webgreeter.setup]
tags: [codam.webgreeter, codam.webgreeter.setup, hooks.d]
shell: "find /usr/share/42/scripts/hooks.d/logout.d -name '*hook-logout.sh'"
register: hook_logout_script
failed_when: hook_logout_script.stdout == ""

- name: Prevent hook-logout from running on login from the greeter
tags: [codam.webgreeter, codam.webgreeter.setup]
tags: [codam.webgreeter, codam.webgreeter.setup, hooks.d]
become: true
blockinfile:
path: "{{ hook_logout_script.stdout }}"
Expand Down

0 comments on commit e5d5673

Please sign in to comment.