mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
47 lines
1.9 KiB
YAML
47 lines
1.9 KiB
YAML
# 2022-07-22: SIMILAR TO roles/iiab-admin/tasks/pwd-warnings.yml FOR passwords
|
|
# AND roles/www_options/tasks/main.yml FOR browser
|
|
|
|
# 2022-07-22: An /etc/profile.d/ version like /etc/local/sbin/iiab-netwarn but for
|
|
# shell / ssh logins (across all OS's/distros/window managers) might also make sense?
|
|
|
|
|
|
- name: Does directory /home/{{ iiab_admin_user }}/.config/labwc/ exist?
|
|
stat:
|
|
path: /home/{{ iiab_admin_user }}/.config/labwc/
|
|
register: labwc_dir
|
|
|
|
- name: If so, add '/usr/local/sbin/iiab-netwarn &' to /home/{{ iiab_admin_user }}/.config/labwc/autostart
|
|
lineinfile:
|
|
path: /home/{{ iiab_admin_user }}/.config/labwc/autostart # iiab-admin
|
|
create: yes
|
|
line: '/usr/local/sbin/iiab-netwarn &'
|
|
when: labwc_dir.stat.exists and labwc_dir.stat.isdir
|
|
|
|
|
|
# mate desktop detection based on 'register: nd_dir' in enable_services
|
|
- name: Does /usr/share/mate/autostart/ exist?
|
|
stat:
|
|
path: /usr/share/mate/autostart/
|
|
register: mate_dir
|
|
|
|
# contents work with mate as of 'switch to using dash via sh'
|
|
# 'text' is up for debate other structural changes I do not recommend JV
|
|
|
|
- name: 'Install from template: /usr/share/mate/autostart/netwarn-iiab-network.desktop'
|
|
template:
|
|
src: roles/network/templates/netwarn/netwarn-iiab-network.desktop # Invoked by 1-prep (so full path needed)
|
|
dest: /usr/share/mate/autostart/
|
|
when: mate_dir.stat.exists and mate_dir.stat.isdir
|
|
|
|
|
|
# 2022-07-21: Is autostart pop-up logic for Mint & stock Ubuntu much the same?
|
|
|
|
# (Let's insert those here if so, and refine the 'when:' line below.)
|
|
|
|
|
|
- name: 'If a supported graphical OS is detected, install from template: /usr/local/sbin/iiab-netwarn'
|
|
template:
|
|
src: roles/network/templates/netwarn/iiab-netwarn # Invoked by 1-prep (so full path needed)
|
|
dest: /usr/local/sbin/
|
|
mode: 0755
|
|
when: (labwc_dir.stat.exists and labwc_dir.stat.isdir) or (mate_dir.stat.exists and mate_dir.stat.isdir)
|