bugfix: awx config update broken

- fixed awx url's after refactoring
qa
Sven Ketelsen 3 years ago
parent 4ae3845681
commit fcb59f2710

@ -21,6 +21,7 @@ shared_service_hostname_management: "{{ shared_service_host_management }}-connec
# use private loadbalancer ip for all kubernetes services
stage_kube: "{{ stage }}"
shared_service_kube_argocd_hostname: "{{ stage_kube }}-argocd.{{ domain_env }}"
shared_service_kube_url_awx: "https://{{ shared_service_kube_awx_hostname }}"
shared_service_kube_awx_hostname: "{{ stage_kube }}-awx.{{ domain_env }}"
shared_service_kube_harbor_hostname: "{{ stage }}-harbor.{{ domain_env }}"
shared_service_kube_jaeger_collector_hostname: "{{ stage_kube }}-jaeger-collector.{{ domain_env }}"

@ -2,9 +2,8 @@
- name: "Fetch all {{ awx_rest_api_type }} ids"
delegate_to: localhost
no_log: true
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/{{ awx_rest_api_type }}/"
url: "{{ shared_service_kube_url_awx }}/api/v2/{{ awx_rest_api_type }}/"
method: GET
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"
@ -21,9 +20,8 @@
- name: "Remove all {{ awx_rest_api_type }}" # noqa ignore-errors
delegate_to: localhost
no_log: true
uri:
url: "{{ awx_base_url }}{{ item.url }}"
url: "{{ shared_service_kube_url_awx }}{{ item.url }}"
method: DELETE
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"

@ -8,7 +8,7 @@
- name: "Search {{ awx_rest_api_type }} informations for {{ awx_search_name }}"
delegate_to: localhost
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/{{ awx_rest_api_type }}/?search={{ awx_search_name | urlencode }}"
url: "{{ shared_service_kube_url_awx }}/api/v2/{{ awx_rest_api_type }}/?search={{ awx_search_name | urlencode }}"
method: GET
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"

@ -6,7 +6,7 @@
- name: "Get {{ job.name }} job_template credential id's from awx server"
delegate_to: localhost
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/job_templates/{{ awx_job_template_id }}/credentials"
url: "{{ shared_service_kube_url_awx }}/api/v2/job_templates/{{ awx_job_template_id }}/credentials"
method: GET
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"
@ -48,7 +48,7 @@
- name: "Add credential id {{ awx_credential_id }} to {{ job.name }} job_template"
delegate_to: localhost
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/job_templates/{{ awx_job_template_id }}/credentials/"
url: "{{ shared_service_kube_url_awx }}/api/v2/job_templates/{{ awx_job_template_id }}/credentials/"
method: POST
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"

@ -29,7 +29,7 @@
playbook: "{{ job.playbook_file | default(job.name + '.yml') }}"
ask_variables_on_launch: true
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/job_templates/"
url: "{{ shared_service_kube_url_awx }}/api/v2/job_templates/"
method: POST
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"

@ -32,7 +32,7 @@
playbook: "{{ job.playbook_file | default(job.name + '.yml') }}"
ask_variables_on_launch: true
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/job_templates/"
url: "{{ shared_service_kube_url_awx }}/api/v2/job_templates/"
method: POST
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"

@ -26,7 +26,7 @@
password: "{{ awx_ansible_password }}"
is_system_auditor: "true"
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/users/"
url: "{{ shared_service_kube_url_awx }}/api/v2/users/"
method: POST
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"
@ -109,7 +109,7 @@
- name: "Add <Machine> credentials <{{ awx_credential_machine_hetzner_name }}> with user: {{ ansible_awx_user_id }}"
delegate_to: localhost
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/credentials/"
url: "{{ shared_service_kube_url_awx }}/api/v2/credentials/"
method: POST
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"
@ -168,7 +168,7 @@
- name: "Add <Source Control> credentials <{{ stage }}-gitea>"
delegate_to: localhost
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/credentials/"
url: "{{ shared_service_kube_url_awx }}/api/v2/credentials/"
method: POST
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"
@ -245,7 +245,7 @@
credential_type_name: "Vault"
vault_password: "{{ ansible_vault_password }}"
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/credentials/"
url: "{{ shared_service_kube_url_awx }}/api/v2/credentials/"
method: POST
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"
@ -312,7 +312,7 @@
username: "{{ harbor_username }}"
password: "{{ harbor_token }}"
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/credentials/"
url: "{{ shared_service_kube_url_awx }}/api/v2/credentials/"
method: POST
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"
@ -369,7 +369,7 @@
credential: "{{ awx_credential_harbor_id }}"
pull: "always"
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/execution_environments/"
url: "{{ shared_service_kube_url_awx }}/api/v2/execution_environments/"
method: POST
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"
@ -423,7 +423,7 @@
name: "localhost"
description: "localhost"
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/inventories/"
url: "{{ shared_service_kube_url_awx }}/api/v2/inventories/"
method: POST
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"
@ -489,7 +489,7 @@
default_environment_id: "{{ awx_ee_hetzner_ansible_id }}"
credential_id: '{{ awx_credential_stagedspecific_gitea_id }}'
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/v2/projects/"
url: "{{ shared_service_kube_url_awx }}/api/v2/projects/"
method: POST
user: "{{ awx_rest_api_access_user }}"
password: "{{ awx_rest_api_access_pw }}"

@ -3,7 +3,7 @@
- name: "Checkin if awx in k8s cluster is available"
delegate_to: localhost
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/login"
url: "{{ shared_service_kube_url_awx }}/api/login"
method: GET
user: "{{ awx_admin_username }}"
password: "{{ awx_admin_password }}"
@ -24,7 +24,7 @@
- name: "Authenticating with awx server"
delegate_to: localhost
uri:
url: "https://{{ shared_service_kube_awx_hostname }}/api/login"
url: "{{ shared_service_kube_url_awx }}/api/login"
method: GET
user: "{{ awx_admin_username }}"
password: "{{ awx_admin_password }}"

Loading…
Cancel
Save