Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
miteshget committed Nov 14, 2024
1 parent df395f1 commit b34fd67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
4 changes: 1 addition & 3 deletions ansible/roles/automation_platform_loader/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
automation_platform_loader_generate_ssh_keypair: true

# Set to false to work with AAP2.5
automation_platform_loader_create_token: true
automation_platform_loader_create_token: 2.4

automation_platform_loader_ssh_key_type: ed25519
automation_platform_loader_ssh_key_path: "/tmp/id_{{ automation_platform_loader_ssh_key_type }}"
22 changes: 11 additions & 11 deletions ansible/roles/automation_platform_loader/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
CONTROLLER_VERIFY_SSL: "{{ aap_auth.controller_verify_ssl | default('true') }}"
block:

- name: Wait until a Automation Controller URL is reachable
ansible.builtin.uri:
url: "https://{{ aap_auth.controller_host | default(aap_controller_web_url) }}"
register: r_ac_url_status
until: r_ac_url_status.status == 200
retries: 30
- name: Create a new AAP2 Auth token using controller username/password
when: automation_platform_loader_aap_version <= 2.4
awx.awx.token:
description: Creating token to configure AAP2 resources
scope: write
state: present
register: r_aap2_token
until: r_aap2_token.failed == false
retries: 10
delay: 30

# - pause:
# minutes: 5

- name: Create a new AAP2 Auth token using controller username/password
when: automation_platform_loader_create_token | bool
awx.awx.token:
when: automation_platform_loader_aap_version > 2.4
ansible.controller.token:
description: Creating token to configure AAP2 resources
scope: write
state: present
Expand Down

0 comments on commit b34fd67

Please sign in to comment.