db fully handeled by python
This commit is contained in:
@ -28,9 +28,6 @@
|
||||
owner: "{{ autologin_user }}"
|
||||
group: "{{ autologin_user }}"
|
||||
mode: 0755
|
||||
|
||||
- name: Drive Index - initialize db
|
||||
shell: "{{ service_folder }}/store_drive.sh -i -d {{ db_path }}"
|
||||
|
||||
- name: "Drive Index - template drive_check.sh"
|
||||
template:
|
||||
@ -94,7 +91,7 @@
|
||||
enabled: yes
|
||||
|
||||
- name: Drive Index - kiosk mode handler
|
||||
when: install_kiosk | bool
|
||||
when: install_kiosk | bool or service_only | bool
|
||||
block:
|
||||
|
||||
- name: Drive Index - set sleep_time to 1
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
|
||||
# create and configure user account
|
||||
- name: Drive health - set up user account
|
||||
when: not quick_refresh | bool
|
||||
include_tasks: user_setup.yaml
|
||||
|
||||
# create drive index service
|
||||
@ -15,7 +14,7 @@
|
||||
|
||||
# set up autologin
|
||||
- name: Drive health - configure autologin
|
||||
when: not install_kiosk | bool
|
||||
when: not install_kiosk | bool or not service_only | bool
|
||||
include_tasks: autologin.yaml
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
---
|
||||
|
||||
- name: "User setup - create {{ autologin_user }} user"
|
||||
when: not quick_refresh | bool
|
||||
user:
|
||||
name: "{{ autologin_user }}"
|
||||
groups: disk
|
||||
@ -8,6 +9,7 @@
|
||||
shell: /bin/bash
|
||||
|
||||
- name: "User setup - ensure {{ autologin_user }} home folder exists"
|
||||
when: not quick_refresh | bool
|
||||
file:
|
||||
path: "/home/{{ autologin_user }}"
|
||||
state: directory
|
||||
@ -15,23 +17,27 @@
|
||||
group: "{{ autologin_user }}"
|
||||
mode: '0700'
|
||||
|
||||
- name: User setup - update permissions on smartctl & fdisk
|
||||
shell: |
|
||||
chmod 755 /usr/sbin/smartctl
|
||||
chmod u+s /usr/sbin/smartctl
|
||||
chmod u+s /usr/sbin/fdisk
|
||||
- name: User setup - autologin needed stuff
|
||||
when: not service_only | bool
|
||||
block:
|
||||
|
||||
- name: User setup - create symlink for smartctl & fdisk
|
||||
ignore_errors: yes
|
||||
shell: |
|
||||
ln /usr/sbin/smartctl /usr/bin/smartctl
|
||||
ln /usr/sbin/fdisk /usr/bin/fdisk
|
||||
- name: User setup - update permissions on smartctl & fdisk
|
||||
shell: |
|
||||
chmod 755 /usr/sbin/smartctl
|
||||
chmod u+s /usr/sbin/smartctl
|
||||
chmod u+s /usr/sbin/fdisk
|
||||
|
||||
- name: "User setup - allow {{ autologin_user }} to smartctl"
|
||||
copy:
|
||||
dest: /etc/sudoers.d/smartctl
|
||||
content: |
|
||||
{{ autologin_user }} ALL=(ALL) NOPASSWD: /usr/sbin/smartctl
|
||||
{{ autologin_user }} ALL=(ALL) NOPASSWD: /usr/sbin/fdisk
|
||||
- name: User setup - create symlink for smartctl & fdisk
|
||||
ignore_errors: yes
|
||||
shell: |
|
||||
ln /usr/sbin/smartctl /usr/bin/smartctl
|
||||
ln /usr/sbin/fdisk /usr/bin/fdisk
|
||||
|
||||
- name: "User setup - allow {{ autologin_user }} to smartctl"
|
||||
copy:
|
||||
dest: /etc/sudoers.d/smartctl
|
||||
content: |
|
||||
{{ autologin_user }} ALL=(ALL) NOPASSWD: /usr/sbin/smartctl
|
||||
{{ autologin_user }} ALL=(ALL) NOPASSWD: /usr/sbin/fdisk
|
||||
|
||||
...
|
||||
Reference in New Issue
Block a user