Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Problem: pulp_installer doesn't install webserver snippets
Browse files Browse the repository at this point in the history
when pulp_install_dir is changed

Solution: Use pulp_install_dir rather than hardcode the path.

Also fail the task if the python intepreter is not found.

fixes: #6956
  • Loading branch information
mikedep333 committed Jun 10, 2020
1 parent 1dece01 commit b3cec68
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/6956.bugfix
@@ -0,0 +1 @@
Fix webserver snippets not being installed when pulp_install_dir is changed from the default value.
5 changes: 3 additions & 2 deletions roles/pulp_webserver/tasks/apache.yml
Expand Up @@ -46,10 +46,11 @@
script:
cmd: check_snippet.py {{ item.key | regex_replace("-", "_") | quote }} apache.conf
args:
executable: /usr/local/lib/pulp/bin/python
executable: "{{ pulp_install_dir }}/bin/python"
register: snippets
with_dict: '{{ pulp_install_plugins_normalized }}'
failed_when: false
failed_when: >
snippets.stderr is search("env: 'python': No such file or directory")
changed_when: false
check_mode: false

Expand Down
5 changes: 3 additions & 2 deletions roles/pulp_webserver/tasks/nginx.yml
Expand Up @@ -56,10 +56,11 @@
script:
cmd: check_snippet.py {{ item.key | regex_replace("-", "_") | quote }} nginx.conf
args:
executable: /usr/local/lib/pulp/bin/python
executable: "{{ pulp_install_dir }}/bin/python"
register: snippets
with_dict: '{{ pulp_install_plugins_normalized }}'
failed_when: false
failed_when: >
snippets.stderr is search("env: 'python': No such file or directory")
changed_when: false
check_mode: false

Expand Down

0 comments on commit b3cec68

Please sign in to comment.