1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/iiab-admin/tasks/main.yml

54 lines
1.8 KiB
YAML
Raw Normal View History

- 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
- 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 }}
ini_file:
2018-10-15 10:13:57 +00:00
dest: "{{ iiab_ini_file }}"
section: iiab-admin
option: "{{ item.option }}"
value: "{{ item.value }}"
2017-05-27 18:09:50 +00:00
with_items:
- option: name
value: iiab-admin
2017-05-27 18:09:50 +00:00
- option: description
2017-05-31 16:08:09 +00:00
value: '"Admin User"'
- option: iiab_admin_user
value: "{{ iiab_admin_user }}"
2017-09-19 19:34:09 +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
template:
src: sshpwd-profile-iiab.sh
dest: /etc/profile.d/
mode: 0644
2017-09-19 19:34:09 +00:00
- name: Is this LXDE-pi?
stat:
path: /etc/xdg/lxsession/LXDE-pi
2017-09-19 19:34:09 +00:00
register: lx
- name: "Likewise for Raspbian, installing: /etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh"
template:
src: sshpwd-lxde-iiab.sh
dest: /etc/xdg/lxsession/LXDE-pi/
mode: 0755
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-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..
# Is this a permissions/security issue presumably? Official autostart spec is:
# https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html
- name: Put line in /etc/xdg/lxsession/LXDE-pi/autostart to run the above (raspbian)
lineinfile:
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