feat(deluge): added role to install deluge and deluge web
This commit is contained in:
parent
bef258cfec
commit
1c625d2d84
19 changed files with 553 additions and 1 deletions
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- name: find systemd unit directory
|
||||
become: true
|
||||
ansible.builtin.command: pkg-config systemd --variable=systemdsystemunitdir
|
||||
changed_when: false
|
||||
register: systemd_unit_directory_cmd
|
||||
- name: find systemd version
|
||||
become: true
|
||||
ansible.builtin.shell: >
|
||||
systemctl --version | awk '{if($1=="systemd" && $2~"^[0-9]+$"){print $2}}'
|
||||
changed_when: false
|
||||
register: systemd_version_cmd
|
||||
- name: set facts
|
||||
ansible.builtin.set_fact:
|
||||
systemd_unit_directory: "{{ systemd_unit_directory_cmd.stdout }}"
|
||||
systemd_version: "{{ systemd_version_cmd.stdout | int }}"
|
||||
deluge_web_password_salt: "{{ deluge_web_password_salt | default(lookup('ansible.builtin.password', '/dev/null', chars=['ascii_letters', 'digits'], length=40), true) }}"
|
||||
- name: compute sha1 digest
|
||||
ansible.builtin.shell: >
|
||||
echo -n "${DELUGED_PASSWD_SALT}${DELUGED_PASSWD}" | openssl dgst -sha1 -r | cut -d ' ' -f 1
|
||||
register: deluge_pwd_sha1
|
||||
changed_when: false
|
||||
environment:
|
||||
DELUGED_PASSWD: '{{ deluge_web_password }}'
|
||||
DELUGED_PASSWD_SALT: '{{ deluge_web_password_salt }}'
|
||||
- name: set facts
|
||||
ansible.builtin.set_fact:
|
||||
deluge_web_password_hash: "{{ deluge_pwd_sha1.stdout }}"
|
Loading…
Add table
Add a link
Reference in a new issue