mirror of
https://github.com/rocky-linux/ansible-role-pinnwand.git
synced 2024-12-22 12:28:30 +00:00
feat: finish adding module tasks
This commit is contained in:
parent
0ce6889ca0
commit
316db5afbe
@ -8,7 +8,7 @@ Type=simple
|
||||
User=pinnwand
|
||||
Group=pinnwand
|
||||
WorkingDirectory=/opt/pinnwand/
|
||||
ExecStart=/opt/pinnwand/bin/matterbridge --configuration-path pinnwand.toml
|
||||
ExecStart=/opt/pinnwand/.local/bin/pinnwand --configuration-path pinnwand.toml
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
|
||||
|
@ -1,2 +1,62 @@
|
||||
---
|
||||
# tasks file for pinnwand
|
||||
- name: "install {{ item }}"
|
||||
package:
|
||||
state: present
|
||||
name: "{{ item }}"
|
||||
with_items:
|
||||
- python39
|
||||
- python39-setuptools
|
||||
- python39-pip
|
||||
|
||||
- name: create pinnwand system user
|
||||
user:
|
||||
name: pinnwand
|
||||
comment: "system user to run pinnwand - do not use"
|
||||
system: yes
|
||||
home: "/opt/pinnwand"
|
||||
create_home: yes
|
||||
|
||||
- name: create/set permissions on /opt/pinnwand static config directory
|
||||
file:
|
||||
state: directory
|
||||
recurse: yes
|
||||
path: "/opt/pinnwand"
|
||||
mode: 0755
|
||||
owner: pinnwand
|
||||
group: pinnwand
|
||||
setype: etc_t
|
||||
seuser: system_u
|
||||
|
||||
- name: install pinnwand into virtualenv
|
||||
pip:
|
||||
name: pinnwand
|
||||
extra_args: --user
|
||||
executable: pip3.9
|
||||
notify: restart pinnwand
|
||||
|
||||
|
||||
- name: install /opt/pinnwand/pinnwand.toml
|
||||
template:
|
||||
src: pinnwand.toml
|
||||
dest: "/opt/pinnwand/pinnwand.toml"
|
||||
mode: 0640
|
||||
owner: pinnwand
|
||||
group: pinnwand
|
||||
setype: etc_t
|
||||
seuser: system_u
|
||||
notify: restart pinnwand
|
||||
|
||||
- name: add /etc/systemd/system/pinnwand.service (systemd unit file)
|
||||
copy:
|
||||
src: pinnwand.service
|
||||
dest: "/etc/systemd/system/pinnwand.service"
|
||||
mode: 0644
|
||||
seuser: system_u
|
||||
setype: systemd_unit_file_t
|
||||
|
||||
- name: start/enable pinnwand.service
|
||||
service:
|
||||
name: pinnwand
|
||||
state: started
|
||||
enabled: yes
|
||||
|
Loading…
Reference in New Issue
Block a user