Skip to content

Commit

Permalink
Skip jq install if it's already installed on the machine
Browse files Browse the repository at this point in the history
  • Loading branch information
dirgim committed Jan 30, 2019
1 parent 0d56d87 commit b4de864
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions playbooks/roles/os_temps/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,17 @@
- name: "Create project {{ openshift_project }}"
import_tasks: get_set_project.yml

# Import_tasks jq for querying container config files
# Check if jq is already installed so we can skip installation
- name: "Check if jq is already installed"
command: jq --version
register: jq_installed
ignore_errors: yes

# Install jq for querying container config files
- name: "Install jq for querying container config files"
package:
name: jq
when: host_os == "linux"
when: host_os == "linux" and jq_installed.rc > 0
become: true

- set_fact:
Expand Down

0 comments on commit b4de864

Please sign in to comment.