-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bring back xml config files for arr services
- Loading branch information
1 parent
ac1f20b
commit 24f6445
Showing
3 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
- name: Create {{ item.key }} config directory | ||
become: true | ||
ansible.builtin.file: | ||
path: /data/state/{{ item.key }} | ||
state: directory | ||
mode: 0755 | ||
owner: "{{ nonroot_uid }}" | ||
group: "{{ nonroot_gid }}" | ||
|
||
- name: Check if config file exists for {{ item.key }} | ||
ansible.builtin.stat: | ||
path: /data/state/{{ item.key }}/config.xml | ||
register: config_file | ||
|
||
- name: Create config file for {{ item.key }} | ||
ansible.builtin.copy: | ||
dest: /data/state/{{ item.key }}/config.xml | ||
content: "<Config/>" | ||
mode: 0600 | ||
when: not config_file.stat.exists | ||
notify: Restart {{ item.key }} | ||
|
||
- name: Configure {{ item.key }} | ||
community.general.xml: | ||
path: /data/state/{{ item.key }}/config.xml | ||
xpath: /Config/{{ param.key }} | ||
value: "{{ param.value }}" | ||
loop: | ||
- key: LogLevel | ||
value: debug | ||
- key: Port | ||
value: "{{ item.value.port }}" | ||
- key: UrlBase | ||
value: "{{ item.key }}" | ||
- key: ApiKey | ||
value: "{{ secrets.api_keys[item.key] }}" | ||
- key: AnalyticsEnabled | ||
value: "false" | ||
- key: AuthenticationMethod | ||
value: External | ||
- key: AuthenticationRequired | ||
value: DisabledForLocalAddresses | ||
- key: LaunchBrowser | ||
value: "false" | ||
loop_control: | ||
loop_var: param | ||
notify: Restart {{ item.key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters