Skip to content

Commit 797700d

Browse files
committed
asdf
1 parent 83ba17a commit 797700d

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ jobs:
2323
steps:
2424
- name: Load the ansible-cloud action
2525
id: controller_job
26-
uses: ansible-cloud/[email protected].15
26+
uses: ansible-cloud/[email protected].16
2727
with:
2828
controller_host: ${{ secrets.CONTROLLER_HOST }}
2929
controller_username: ${{ secrets.CONTROLLER_USERNAME }}
3030
controller_password: ${{ secrets.CONTROLLER_PASSWORD }}
3131
job_template: "AWS - ec2 enforce owner tag"
32-
controller_project: "aws ec2 operational project"
32+
controller_project: "test project"
3333
extra_vars: "your_region=us-west-1"
3434
validate_certs: false
3535
env:

entrypoint.sh

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,44 @@ tee playbook.yml << EOF
8484
8585
- name: project update and sync
8686
block:
87-
- name: update project
87+
- name: retrieve info on existing specified project in Automation controller
88+
set_fact:
89+
project_info: "{{ query('awx.awx.controller_api', 'projects', verify_ssl=$CONTROLLER_VERIFY_SSL, query_params={ 'name': 'test project' }) }}"
90+
91+
- name: print out existing project settings to terminal
92+
debug:
93+
msg:
94+
- description: "{{ project_info[0].description }}"
95+
- organization: "{{ project_info[0].organization }}"
96+
- default_environment: "{{ project_info[0].default_environment }}"
97+
- scm_type: "{{ project_info[0].scm_type }}"
98+
- scm_url: "{{ project_info[0].scm_url }}"
99+
- scm_branch: "{{ project_info[0].scm_branch }}"
100+
- scm_refspec: "{{ project_info[0].scm_refspec }}"
101+
- credential: "{{ project_info[0].credential }}"
102+
- scm_clean: "{{ project_info[0].scm_clean }}"
103+
- scm_delete_on_update: "{{ project_info[0].scm_delete_on_update }}"
104+
- scm_track_submodules: "{{ project_info[0].scm_track_submodules }}"
105+
- scm_update_on_launch: "{{ project_info[0].scm_update_on_launch }}"
106+
- allow_override: "{{ project_info[0].allow_override }}"
107+
108+
- name: update project to point at pull request
88109
awx.awx.project:
89110
name: "{{ project_var }}"
90111
state: present
91-
scm_type: git
112+
description: "{{ project_info[0].description }}"
113+
organization: "{{ project_info[0].organization }}"
114+
default_environment: "{{ project_info[0].default_environment }}"
115+
scm_type: "{{ project_info[0].scm_type }}"
92116
scm_url: "$scm_url"
93117
scm_branch: "$scm_branch"
94118
scm_refspec: "$scm_refspec"
119+
credential: "{{ project_info[0].credential }}"
120+
scm_clean: "{{ project_info[0].scm_clean }}"
121+
scm_delete_on_update: "{{ project_info[0].scm_delete_on_update }}"
122+
scm_track_submodules: "{{ project_info[0].scm_track_submodules }}"
123+
scm_update_on_launch: "{{ project_info[0].scm_update_on_launch }}"
124+
allow_override: "{{ project_info[0].allow_override }}"
95125
96126
- name: sync project update
97127
awx.awx.project_update:

0 commit comments

Comments
 (0)