2017-10-31 03:55:24 +00:00
|
|
|
- include_tasks: admin-user.yml
|
2017-05-27 18:09:50 +00:00
|
|
|
tags:
|
|
|
|
- base
|
2018-10-15 08:02:22 +00:00
|
|
|
when: iiab_admin_user_install
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2017-10-31 03:55:24 +00:00
|
|
|
- include_tasks: access.yml
|
2017-05-27 18:09:50 +00:00
|
|
|
tags:
|
|
|
|
- base
|
|
|
|
|
2018-11-04 02:58:37 +00:00
|
|
|
- name: Add 'iiab-admin' variable values to {{ iiab_ini_file }}
|
2017-12-06 19:47:53 +00:00
|
|
|
ini_file:
|
2018-10-15 10:13:57 +00:00
|
|
|
dest: "{{ iiab_ini_file }}"
|
2017-12-06 19:47:53 +00:00
|
|
|
section: iiab-admin
|
|
|
|
option: "{{ item.option }}"
|
|
|
|
value: "{{ item.value }}"
|
2017-05-27 18:09:50 +00:00
|
|
|
with_items:
|
|
|
|
- option: name
|
2017-06-09 23:25:56 +00:00
|
|
|
value: iiab-admin
|
2017-05-27 18:09:50 +00:00
|
|
|
- option: description
|
2017-05-31 16:08:09 +00:00
|
|
|
value: '"Admin User"'
|
2017-06-09 23:25:56 +00:00
|
|
|
- option: iiab_admin_user
|
|
|
|
value: "{{ iiab_admin_user }}"
|
2017-09-19 19:34:09 +00:00
|
|
|
|
2019-03-08 00:41:46 +00:00
|
|
|
- name: Install /etc/profile.d/sshpwd-profile-iiab.sh from template, to issue warnings (during shell/ssh logins) if iiab-admin password is the default
|
2017-12-06 19:47:53 +00:00
|
|
|
template:
|
2019-03-08 00:41:46 +00:00
|
|
|
src: sshpwd-profile-iiab.sh
|
2017-12-06 19:47:53 +00:00
|
|
|
dest: /etc/profile.d/
|
2019-03-08 00:41:46 +00:00
|
|
|
mode: 0644
|
2017-09-19 19:34:09 +00:00
|
|
|
|
2019-03-08 00:41:46 +00:00
|
|
|
- name: Is this LXDE-pi?
|
2017-12-06 19:47:53 +00:00
|
|
|
stat:
|
2019-03-08 00:41:46 +00:00
|
|
|
path: /etc/xdg/lxsession/LXDE-pi
|
2017-09-19 19:34:09 +00:00
|
|
|
register: lx
|
|
|
|
|
2019-03-08 00:41:46 +00:00
|
|
|
- name: "Likewise for Raspbian, installing: /etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh"
|
2017-12-06 19:47:53 +00:00
|
|
|
template:
|
2019-03-08 00:41:46 +00:00
|
|
|
src: sshpwd-lxde-iiab.sh
|
|
|
|
dest: /etc/xdg/lxsession/LXDE-pi/
|
|
|
|
mode: 0755
|
2017-10-12 12:36:48 +00:00
|
|
|
when: lx.stat.isdir is defined and lx.stat.isdir and is_rpi and is_debuntu
|
2017-09-19 19:34:09 +00:00
|
|
|
|
2019-03-08 00:41:46 +00:00
|
|
|
# 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
|
|
|
|
# (or pprompt.desktop as Raspbian has working since 2018-11-13!) Too bad as it
|
|
|
|
# would be really nice to standardize this popup across Ubermix & all distros..
|
2019-03-08 01:47:43 +00:00
|
|
|
# Is this a permissions/security issue presumably? Official autostart spec is:
|
|
|
|
# https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html
|
2019-03-08 00:41:46 +00:00
|
|
|
|
|
|
|
- name: Put line in /etc/xdg/lxsession/LXDE-pi/autostart to run the above (raspbian)
|
2017-12-06 19:47:53 +00:00
|
|
|
lineinfile:
|
2019-03-08 00:41:46 +00:00
|
|
|
path: /etc/xdg/lxsession/LXDE-pi/autostart
|
|
|
|
line: "@/etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh"
|
2017-10-12 12:38:29 +00:00
|
|
|
when: lx.stat.isdir is defined and lx.stat.isdir and is_rpi and is_debuntu
|