- include_tasks: admin-user.yml tags: - base when: iiab_admin_user_install | bool - include_tasks: access.yml tags: - base - name: Add 'iiab-admin' variable values to {{ iiab_ini_file }} ini_file: dest: "{{ iiab_ini_file }}" section: iiab-admin option: "{{ item.option }}" value: "{{ item.value }}" with_items: - option: name value: iiab-admin - option: description value: '"Admin User"' - option: iiab_admin_user value: "{{ iiab_admin_user }}" - 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 - name: Is this LXDE-pi? stat: path: /etc/xdg/lxsession/LXDE-pi 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 # 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 # 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) 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_rpi and is_debuntu