Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip jq install if it's already installed on the machine #143

Merged
merged 1 commit into from
Jan 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
dirgim marked this conversation as resolved.
Show resolved Hide resolved
register: jq_installed
dirgim marked this conversation as resolved.
Show resolved Hide resolved
ignore_errors: yes
dirgim marked this conversation as resolved.
Show resolved Hide resolved

# 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
dirgim marked this conversation as resolved.
Show resolved Hide resolved

- set_fact:
Expand Down