Skip to content

Commit c2119b2

Browse files
committed
Update entrypoint.sh
1 parent a88ba4f commit c2119b2

File tree

1 file changed

+72
-66
lines changed

1 file changed

+72
-66
lines changed

entrypoint.sh

Lines changed: 72 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -84,75 +84,81 @@ tee playbook.yml << EOF
8484
msg:
8585
- "extra vars are {{ extra_vars }}"
8686
87+
- name: print out workflow_template_var length
88+
debug:
89+
msg:
90+
- "workflow_template_var | length is {{ workflow_template_var | length }}"
91+
8792
- name: project update and sync
8893
when: workflow_template_var|length == 0
8994
block:
90-
- name: retrieve info on existing specified project in Automation controller
91-
set_fact:
92-
project_info: "{{ query('awx.awx.controller_api', 'projects', verify_ssl=$CONTROLLER_VERIFY_SSL, query_params={ 'name': '$CONTROLLER_PROJECT' }) }}"
93-
template_info: "{{ query('awx.awx.controller_api', 'job_templates', verify_ssl=$CONTROLLER_VERIFY_SSL, query_params={ 'name': '$JOB_TEMPLATE' }) }}"
94-
scm_url: "$scm_url"
95-
scm_branch: "$scm_branch"
96-
scm_refspec: "refs/pull/*:refs/remotes/origin/pull/*"
97-
98-
- name: print out existing project settings to terminal
99-
debug:
100-
msg:
101-
- description: "{{ project_info[0].description }}"
102-
- organization: "{{ project_info[0].organization }}"
103-
- default_environment: "{{ project_info[0].default_environment }}"
104-
- scm_type: "{{ project_info[0].scm_type }}"
105-
- scm_url: "{{ project_info[0].scm_url }}"
106-
- scm_branch: "{{ project_info[0].scm_branch }}"
107-
- scm_refspec: "{{ project_info[0].scm_refspec }}"
108-
- credential: "{{ project_info[0].credential }}"
109-
- scm_clean: "{{ project_info[0].scm_clean }}"
110-
- scm_delete_on_update: "{{ project_info[0].scm_delete_on_update }}"
111-
- scm_track_submodules: "{{ project_info[0].scm_track_submodules }}"
112-
- scm_update_on_launch: "{{ project_info[0].scm_update_on_launch }}"
113-
- allow_override: "{{ project_info[0].allow_override }}"
114-
115-
- name: print out existing job template settings to terminal
116-
debug:
117-
msg:
118-
- allow_simultaneous: "{{ template_info[0].allow_simultaneous }}"
119-
- ask_credential_on_launch: "{{ template_info[0].ask_credential_on_launch }}"
120-
- ask_diff_mode_on_launch: "{{ template_info[0].ask_diff_mode_on_launch }}"
121-
- ask_inventory_on_launch: "{{ template_info[0].ask_diff_mode_on_launch }}"
122-
- ask_job_type_on_launch: "{{ template_info[0].ask_job_type_on_launch }}"
123-
- ask_limit_on_launch: "{{ template_info[0].ask_limit_on_launch }}"
124-
- ask_scm_branch_on_launch: "{{ template_info[0].ask_scm_branch_on_launch }}"
125-
- ask_skip_tags_on_launch: "{{ template_info[0].ask_skip_tags_on_launch }}"
126-
- ask_tags_on_launch: "{{ template_info[0].ask_tags_on_launch }}"
127-
- ask_variables_on_launch: "{{ template_info[0].ask_variables_on_launch }}"
128-
- ask_verbosity_on_launch: "{{ template_info[0].ask_verbosity_on_launch }}"
129-
- become_enabled: "{{ template_info[0].become_enabled }}"
130-
- credentials: "{{ credentials | default(omit, true) }}"
131-
- description: "{{ template_info[0].description }}"
132-
- diff_mode: "{{ template_info[0].diff_mode }}"
133-
- execution_environment: "{{ template_info[0].execution_environment }}"
134-
- extra_vars: "{% if not template_info[0].extra_vars | from_yaml %}{}{% else %}blah{% endif %}"
135-
- force_handlers: "{{ template_info[0].force_handlers }}"
136-
- forks: "{{ template_info[0].forks }}"
137-
- host_config_key: "{{ template_info[0].host_config_key }}"
138-
- inventory: "{{ template_info[0].inventory }}"
139-
- job_slice_count: "{{ template_info[0].job_slice_count }}"
140-
- job_tags: "{{ template_info[0].job_tags }}"
141-
- job_type: "{{ template_info[0].job_type }}"
142-
- limit: "{{ template_info[0].limit }}"
143-
- name: "{{ template_info[0].name }}"
144-
- organization: "{{ template_info[0].organization }}"
145-
- playbook: "{{ template_info[0].playbook }}"
146-
- project: "{{ template_info[0].project }}"
147-
- scm_branch: "{{ template_info[0].scm_branch }}"
148-
- skip_tags: "{{ template_info[0].skip_tags }}"
149-
- start_at_task: "{{ template_info[0].start_at_task }}"
150-
- survey_enabled: "{{ template_info[0].survey_enabled }}"
151-
- timeout: "{{ template_info[0].timeout }}"
152-
- use_fact_cache: "{{ template_info[0].use_fact_cache }}"
153-
- verbosity: "{{ template_info[0].verbosity }}"
154-
- wobhook_credential: "{{ template_info[0].webhook_credential | default(omit, true) }}"
155-
- webhook_service: "{{ template_info[0].webhook_service }}"
95+
- name: retrieve info on existing specified project in Automation controller
96+
set_fact:
97+
project_info: "{{ query('awx.awx.controller_api', 'projects', verify_ssl=$CONTROLLER_VERIFY_SSL, query_params={ 'name': '$CONTROLLER_PROJECT' }) }}"
98+
template_info: "{{ query('awx.awx.controller_api', 'job_templates', verify_ssl=$CONTROLLER_VERIFY_SSL, query_params={ 'name': '$JOB_TEMPLATE' }) }}"
99+
scm_url: "$scm_url"
100+
scm_branch: "$scm_branch"
101+
scm_refspec: "refs/pull/*:refs/remotes/origin/pull/*"
102+
103+
- name: print out existing project settings to terminal
104+
debug:
105+
msg:
106+
- description: "{{ project_info[0].description }}"
107+
- organization: "{{ project_info[0].organization }}"
108+
- default_environment: "{{ project_info[0].default_environment }}"
109+
- scm_type: "{{ project_info[0].scm_type }}"
110+
- scm_url: "{{ project_info[0].scm_url }}"
111+
- scm_branch: "{{ project_info[0].scm_branch }}"
112+
- scm_refspec: "{{ project_info[0].scm_refspec }}"
113+
- credential: "{{ project_info[0].credential }}"
114+
- scm_clean: "{{ project_info[0].scm_clean }}"
115+
- scm_delete_on_update: "{{ project_info[0].scm_delete_on_update }}"
116+
- scm_track_submodules: "{{ project_info[0].scm_track_submodules }}"
117+
- scm_update_on_launch: "{{ project_info[0].scm_update_on_launch }}"
118+
- allow_override: "{{ project_info[0].allow_override }}"
119+
120+
- name: print out existing job template settings to terminal
121+
debug:
122+
msg:
123+
- allow_simultaneous: "{{ template_info[0].allow_simultaneous }}"
124+
- ask_credential_on_launch: "{{ template_info[0].ask_credential_on_launch }}"
125+
- ask_diff_mode_on_launch: "{{ template_info[0].ask_diff_mode_on_launch }}"
126+
- ask_inventory_on_launch: "{{ template_info[0].ask_diff_mode_on_launch }}"
127+
- ask_job_type_on_launch: "{{ template_info[0].ask_job_type_on_launch }}"
128+
- ask_limit_on_launch: "{{ template_info[0].ask_limit_on_launch }}"
129+
- ask_scm_branch_on_launch: "{{ template_info[0].ask_scm_branch_on_launch }}"
130+
- ask_skip_tags_on_launch: "{{ template_info[0].ask_skip_tags_on_launch }}"
131+
- ask_tags_on_launch: "{{ template_info[0].ask_tags_on_launch }}"
132+
- ask_variables_on_launch: "{{ template_info[0].ask_variables_on_launch }}"
133+
- ask_verbosity_on_launch: "{{ template_info[0].ask_verbosity_on_launch }}"
134+
- become_enabled: "{{ template_info[0].become_enabled }}"
135+
- credentials: "{{ credentials | default(omit, true) }}"
136+
- description: "{{ template_info[0].description }}"
137+
- diff_mode: "{{ template_info[0].diff_mode }}"
138+
- execution_environment: "{{ template_info[0].execution_environment }}"
139+
- extra_vars: "{% if not template_info[0].extra_vars | from_yaml %}{}{% else %}blah{% endif %}"
140+
- force_handlers: "{{ template_info[0].force_handlers }}"
141+
- forks: "{{ template_info[0].forks }}"
142+
- host_config_key: "{{ template_info[0].host_config_key }}"
143+
- inventory: "{{ template_info[0].inventory }}"
144+
- job_slice_count: "{{ template_info[0].job_slice_count }}"
145+
- job_tags: "{{ template_info[0].job_tags }}"
146+
- job_type: "{{ template_info[0].job_type }}"
147+
- limit: "{{ template_info[0].limit }}"
148+
- name: "{{ template_info[0].name }}"
149+
- organization: "{{ template_info[0].organization }}"
150+
- playbook: "{{ template_info[0].playbook }}"
151+
- project: "{{ template_info[0].project }}"
152+
- scm_branch: "{{ template_info[0].scm_branch }}"
153+
- skip_tags: "{{ template_info[0].skip_tags }}"
154+
- start_at_task: "{{ template_info[0].start_at_task }}"
155+
- survey_enabled: "{{ template_info[0].survey_enabled }}"
156+
- timeout: "{{ template_info[0].timeout }}"
157+
- use_fact_cache: "{{ template_info[0].use_fact_cache }}"
158+
- verbosity: "{{ template_info[0].verbosity }}"
159+
- wobhook_credential: "{{ template_info[0].webhook_credential | default(omit, true) }}"
160+
- webhook_service: "{{ template_info[0].webhook_service }}"
161+
when: workflow_template_var|length == 0
156162
157163
- name: figure out creds for JT
158164
set_fact:

0 commit comments

Comments
 (0)