39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
|
---
|
||
|
|
||
|
- name: Apt install python3-pip
|
||
|
apt:
|
||
|
name: python3-pip
|
||
|
cache_valid_time: 7200
|
||
|
state: present
|
||
|
- name: Install sysdweb
|
||
|
pip:
|
||
|
name: sysdweb
|
||
|
executable: pip3
|
||
|
- name: sysdweb user
|
||
|
user:
|
||
|
name: sysdweb
|
||
|
shell: /usr/bin/nologin
|
||
|
password: "$6$TcTD23xOXln$RxN3Kd0vJRaxffoyKqjoBJM0Q5Va6REBVZ6BOgmGXs3fTAWc7voSW5QcN35t9pfro2do0LeSaeGsrMLbArZ.2."
|
||
|
update_password: always
|
||
|
- name: Configure sysdweb user
|
||
|
blockinfile:
|
||
|
path: /etc/sysdweb.conf
|
||
|
create: true
|
||
|
marker: "# {mark} ansible user"
|
||
|
block : |
|
||
|
[DEFAULT]
|
||
|
users = sysdweb
|
||
|
- name: Configure sysdweb
|
||
|
blockinfile:
|
||
|
path: /etc/sysdweb.conf
|
||
|
create: true
|
||
|
marker: "# {mark} ansible managed for {{sysdweb_name}}"
|
||
|
block: |
|
||
|
[{{sysdweb_name}}]
|
||
|
title = {{sysdweb_name}}
|
||
|
unit = {{sysdweb_name}}.service
|
||
|
- name: Install systemd service file
|
||
|
copy: src=sysdweb-system.service dest=/lib/systemd/system/
|
||
|
- name: Enable sysdweb autostart
|
||
|
systemd: name=sysdweb-system state=restarted enabled=yes daemon_reload=yes
|