Skip to content

Commit

Permalink
Merge pull request #133 from lslebodn/fix_jq
Browse files Browse the repository at this point in the history
Fix extracting ImageStream/BuildConfig from template
  • Loading branch information
dirgim committed Jan 14, 2019
2 parents 62ef15e + 763df83 commit 975abd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playbooks/roles/os_temps/tasks/setup_os_templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# imagestreams
- name: "{{ container_config_name }} :: Get imagestream name from the yaml file"
shell: "{{ oc_bin }} process -f {{ template_name }} | jq --raw-output '.items[0].metadata.name'"
shell: "{{ oc_bin }} process -f {{ template_name }} | jq --raw-output '.items | map(select(.kind == \"ImageStream\")) | .[].metadata.name'"
register: "image_stream_name_file"

- name: "{{ container_config_name }} :: Get imagestream from querying the cluster"
Expand All @@ -44,7 +44,7 @@

# buildconfigs
- name: "{{ container_config_name }} :: Get buildconfig name from the yaml file"
shell: "{{ oc_bin }} process -f {{ template_name }} | jq --raw-output '.items[1].metadata.name'"
shell: "{{ oc_bin }} process -f {{ template_name }} | jq --raw-output '.items | map(select(.kind == \"BuildConfig\")) | .[].metadata.name'"
register: "build_config_name_file"

- name: "{{ container_config_name }} :: Get buildconfig from querying the cluster"
Expand Down

0 comments on commit 975abd7

Please sign in to comment.