Skip to content

Commit

Permalink
Simpler error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Oct 22, 2019
1 parent 27179c5 commit 41eebe4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
Binary file removed tasks/.main.yml.swp
Binary file not shown.
22 changes: 7 additions & 15 deletions tasks/main.yml
Expand Up @@ -12,18 +12,10 @@
retries: 3

- name: try to install pip packages
block:
- name: install pip packages (allowed to fail)
pip:
name: "{{ core_dependencies_pip_packages }}"
state: present
register: core_dependencies_install_pip_packages
until: core_dependencies_install_pip_packages is succeeded
retries: 3
failed_when: no
rescue:
- name: gracefully finish
debug:
msg:
- "Your system can't install pip packages."
- "Skipping the pip dependencies."
pip:
name: "{{ core_dependencies_pip_packages }}"
state: present
register: core_dependencies_install_pip_packages
until: core_dependencies_install_pip_packages is succeeded
retries: 3
failed_when: no

0 comments on commit 41eebe4

Please sign in to comment.