Skip to content

Commit

Permalink
update sabnzbd flow
Browse files Browse the repository at this point in the history
  • Loading branch information
ahembree committed Sep 20, 2024
1 parent 7b12665 commit 401c24c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions roles/hmsdocker/tasks/sabnzbd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
path: "{{ hms_docker_apps_path }}/sabnzbd/config/sabnzbd.ini"
register: sabnzbd_config_path

# Cmd is used here instead of a "trigger" to then restart the container using the docker module since this will trigger automatically
- name: restart sabnzbd inline if config not exist
ansible.builtin.shell:
cmd: docker restart sabnzbd
cmd: docker restart sabnzbd && sleep 10
when: not sabnzbd_config_path.stat.exists

- name: Check if config file exists after container restart
Expand All @@ -29,7 +30,7 @@
slurped_sabnzbd_hostlist: "{{ slurped_sabnzbd_data['content'] | b64decode | regex_search('(?<=host_whitelist = ).*') | split(',') }}"
cacheable: false
when: slurped_sabnzbd_data['content'] is defined
no_log: "{{ not is_github_runner }}"
no_log: true

- name: Ensure sabnzbd container config has allowlisted hostname
ansible.builtin.replace:
Expand Down

0 comments on commit 401c24c

Please sign in to comment.