1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

iiab-admin/tasks/pwd-warnings.yml: Tighten up 'when: lx.stat.isdir' (/etc/xdg/lxsession/LXDE-pi)

This commit is contained in:
A Holt 2021-08-28 22:49:05 -04:00 committed by GitHub
parent cb0f1f171c
commit 6d1b98de64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,17 +4,17 @@
dest: /etc/profile.d/sshpwd-profile-iiab.sh
mode: '0644'
- name: Is this LXDE-pi?
- name: Is /etc/xdg/lxsession/LXDE-pi a directory?
stat:
path: /etc/xdg/lxsession/LXDE-pi
register: lx
- name: "Likewise for Raspbian, installing: /etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh"
- name: "If so, install: /etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh"
template:
src: sshpwd-lxde-iiab.sh.j2
dest: /etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh
mode: '0755'
when: lx.stat.isdir is defined and lx.stat.isdir and is_raspbian and is_debuntu
when: lx.stat.isdir is defined and lx.stat.isdir # and is_raspbian
# 2019-03-07: This popup (/etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh) does
# not actually appear when triggered by /etc/xdg/autostart/pprompt-iiab.desktop
@ -24,8 +24,8 @@
# https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html
# Raspbian's 2016-2018 evolution here: https://github.com/iiab/iiab/issues/1537
- name: Put line in /etc/xdg/lxsession/LXDE-pi/autostart to run the above (raspbian)
- name: ...and put a line in /etc/xdg/lxsession/LXDE-pi/autostart to trigger popups
lineinfile:
path: /etc/xdg/lxsession/LXDE-pi/autostart
line: "@/etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh"
when: lx.stat.isdir is defined and lx.stat.isdir and is_raspbian
when: lx.stat.isdir is defined and lx.stat.isdir # and is_raspbian