mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
48 lines
1.9 KiB
YAML
48 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 /home/{{ iiab_admin_user }}/.config/wayfire.ini exist?
|
|
stat:
|
|
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini
|
|
register: wayfire_ini
|
|
|
|
- name: If so, add /usr/local/sbin/iiab-netwarn to /home/{{ iiab_admin_user }}/.config/wayfire.ini
|
|
ini_file:
|
|
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini # iiab-admin
|
|
section: autostart
|
|
option: iiab-netwarn
|
|
value: /usr/local/sbin/iiab-netwarn
|
|
when: wayfire_ini.stat.exists
|
|
|
|
|
|
# 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: wayfire_ini.stat.exists or (mate_dir.stat.exists and mate_dir.stat.isdir)
|