Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit e42f526

Browse files
committed
Plex Autoscan: Use Ansible password plugin to generate server pass.
vs pwgen tool
1 parent 9a38c16 commit e42f526

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

roles/plex_autoscan/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
when: plex_account_enabled
6565

6666
- name: "Generate 32 character SERVER_PASS"
67-
shell: "pwgen 32 1"
68-
register: plex_autoscan_pass
67+
set_fact:
68+
plex_autoscan_server_pass: "{{ lookup('password', '/dev/null chars=ascii_letters,digits length=32') }}"
6969

7070
- name: Import default config
7171
template:

roles/plex_autoscan/templates/config.json.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"Thumbs.db"
8383
],
8484
"SERVER_IP":"0.0.0.0",
85-
"SERVER_PASS":"{{ plex_autoscan_pass.stdout }}",
85+
"SERVER_PASS":"{{ plex_autoscan_server_pass | default('') }}",
8686
"SERVER_PATH_MAPPINGS":{
8787
"/data/Movies/":[
8888
"/movies/",

0 commit comments

Comments
 (0)