Add 'kiosk' configuration.
This commit is contained in:
parent
546dabd7aa
commit
d203da49c2
9 changed files with 246 additions and 0 deletions
83
roles/kiosk/tasks/main.yml
Normal file
83
roles/kiosk/tasks/main.yml
Normal file
|
@ -0,0 +1,83 @@
|
|||
- name: check if gdm3 is installed
|
||||
stat: path=/etc/gdm3/daemon.conf
|
||||
register: gdm3
|
||||
|
||||
- name: enable auto login
|
||||
when: gdm3.stat.exists == true
|
||||
lineinfile:
|
||||
dest: /etc/gdm3/daemon.conf
|
||||
insertafter: '^#\s*AutomaticLoginEnable = true'
|
||||
line: 'AutomaticLoginEnable = true'
|
||||
|
||||
- name: auto login user
|
||||
when: gdm3.stat.exists == true
|
||||
lineinfile:
|
||||
dest: /etc/gdm3/daemon.conf
|
||||
insertafter: '^#\s*AutomaticLogin = '
|
||||
line: 'AutomaticLogin = {{ auto_user }}'
|
||||
|
||||
- name: graphics quirk
|
||||
when: ansible_product_name == "HP 500"
|
||||
lineinfile:
|
||||
dest: /etc/default/grub
|
||||
regexp: '^(GRUB_CMDLINE_LINUX_DEFAULT=).*'
|
||||
line: '\1"video=SVIDEO-1:d"'
|
||||
backrefs: yes
|
||||
notify: update grub
|
||||
|
||||
- name: grub timeout
|
||||
lineinfile:
|
||||
dest: /etc/default/grub
|
||||
regexp: '^(GRUB_TIMEOUT=).*'
|
||||
line: '\g<1>1'
|
||||
backrefs: yes
|
||||
notify: update grub
|
||||
|
||||
- name: keyboard compose key
|
||||
lineinfile:
|
||||
dest: /etc/default/keyboard
|
||||
regexp: '^(XKBOPTIONS=).*'
|
||||
line: '\1"compose:caps"'
|
||||
backrefs: yes
|
||||
|
||||
- name: hibernate when lid is closed
|
||||
lineinfile:
|
||||
dest: /etc/systemd/logind.conf
|
||||
insertafter: '^#\s*HandleLidSwitch='
|
||||
line: 'HandleLidSwitch=hibernate'
|
||||
|
||||
- name: tmp on tmpfs
|
||||
shell: cp /usr/share/systemd/tmp.mount /etc/systemd/system/
|
||||
args:
|
||||
creates: /etc/systemd/system/tmp.mount
|
||||
notify: enable tmp.mount
|
||||
|
||||
- name: mount tmpfs on /home/{{ auto_user }}
|
||||
mount:
|
||||
name: /home/{{ auto_user }}
|
||||
src: tmpfs
|
||||
fstype: tmpfs
|
||||
opts: uid=1001,gid=1001,mode=755,size=4G
|
||||
state: mounted
|
||||
|
||||
- name: add autologin user
|
||||
user:
|
||||
name: "{{ auto_user }}"
|
||||
comment: "Autologin Debian User,,,"
|
||||
shell: /bin/bash
|
||||
createhome: no
|
||||
password: '*'
|
||||
|
||||
- name: check if NetworkManager is installed
|
||||
stat: path=/etc/NetworkManager/system-connections
|
||||
register: NetworkManager
|
||||
|
||||
- name: add wifi config
|
||||
when: NetworkManager.stat.exists == true
|
||||
template:
|
||||
src: wifi.j2
|
||||
dest: /etc/NetworkManager/system-connections/{{ wifi_ssid }}
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0600'
|
||||
notify: reload NetworkManager
|
Loading…
Add table
Add a link
Reference in a new issue