ensure-sphinx: do not attempt a gettext install if exists
Avoid failure due to "become: yes" when sudo is not allowed (in a container for instance). This patch check if gettext is installed before calling the package module with become: yes. Change-Id: Ibb7f65afad234b39e50aba429b633d70938738f5
This commit is contained in:
parent
ce56d5182a
commit
8fb6c01f68
|
@ -1,9 +1,15 @@
|
|||
- name: Check for gettext installed
|
||||
command: bash -c "type gettext"
|
||||
ignore_errors: yes
|
||||
register: gettext_exists
|
||||
|
||||
# TODO(mordred) Make this a list of known binary depends that sphinx needs
|
||||
- name: Install gettext package
|
||||
package:
|
||||
name: gettext
|
||||
state: present
|
||||
become: yes
|
||||
when: gettext_exists.rc != 0
|
||||
|
||||
- name: Find Constraints File
|
||||
include_role:
|
||||
|
|
Loading…
Reference in New Issue