Skip to content

Commit

Permalink
Another Round (#941)
Browse files Browse the repository at this point in the history
* readme updates

* gateway collection updates

* udpate to global aap vars

* more role conversions

* update roles loops
  • Loading branch information
sean-m-sullivan authored Oct 21, 2024
1 parent 6311500 commit aa087bc
Show file tree
Hide file tree
Showing 234 changed files with 1,207 additions and 739 deletions.
1 change: 1 addition & 0 deletions changelogs/fragments/Rewrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ major_changes:
- Introduction of roles for gateway
bugfixes:
- Controller credentials role now includes request timeout option.
- meta_dependency_check set to default to false. This is due to feature not working on controller, or in offline environments without a hub. Set controller_dependency_check to 'true' to re-enable feature.
2 changes: 1 addition & 1 deletion roles/ansible_config/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
# issue_tracker_url: http://example.com/issue/tracker
license: GPL-3.0-or-later

min_ansible_version: 2.14.0
min_ansible_version: 2.16.0

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
Expand Down
2 changes: 1 addition & 1 deletion roles/controller_ad_hoc_command/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
# issue_tracker_url: http://example.com/issue/tracker
license: GPL-3.0-or-later

min_ansible_version: 2.15.0
min_ansible_version: 2.16.0

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
Expand Down
2 changes: 1 addition & 1 deletion roles/controller_ad_hoc_command_cancel/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
# issue_tracker_url: http://example.com/issue/tracker
license: GPL-3.0-or-later

min_ansible_version: 2.15.0
min_ansible_version: 2.16.0

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
Expand Down
12 changes: 6 additions & 6 deletions roles/controller_applications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Currently:
|`aap_password`|""|no|Platform Admin User's password on the Server. This should be stored in an Ansible Vault at vars/platform-secrets.yml or elsewhere and called from a parent playbook.||
|`aap_token`|""|no|Controller Admin User's token on the Ansible Automation Platform Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.||
|`aap_request_timeout`|`10`|no|Specify the timeout in seconds Ansible should use in requests to the controller host.||
|`controller_applications`|`see below`|yes|Data structure describing your applications, described below. Alias: applications ||
|`aap_applications`|`see below`|yes|Data structure describing your applications, described below. Alias: applications ||

### Enforcing defaults

Expand All @@ -34,12 +34,12 @@ This should be enabled to enforce configuration and prevent configuration drift.

Enabling this will enforce configurtion without specifying every option in the configuration files.

'controller_configuration_applications_enforce_defaults' defaults to the value of 'controller_configuration_enforce_defaults' if it is not explicitly called. This allows for enforced defaults to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it.
'controller_configuration_applications_enforce_defaults' defaults to the value of 'aap_configuration_enforce_defaults' if it is not explicitly called. This allows for enforced defaults to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it.

|Variable Name|Default Value|Required|Description|
|:---:|:---:|:---:|:---:|
|`controller_configuration_applications_enforce_defaults`|`False`|no|Whether or not to enforce default option values on only the applications role|
|`controller_configuration_enforce_defaults`|`False`|no|This variable enables enforced default values as well, but is shared across multiple roles, see above.|
|`aap_configuration_enforce_defaults`|`False`|no|This variable enables enforced default values as well, but is shared across multiple roles, see above.|

### Secure Logging Variables

Expand Down Expand Up @@ -92,7 +92,7 @@ This also speeds up the overall role.

```json
{
"controller_applications": [
"aap_applications": [
{
"name": "controller Config Default Application",
"description": "Generic application, which can be used for oauth tokens",
Expand All @@ -109,7 +109,7 @@ This also speeds up the overall role.

```yaml
---
controller_applications:
aap_applications:
- name: "controller Config Default Application"
description: "Generic application, which can be used for oauth tokens"
organization: "Default"
Expand Down Expand Up @@ -137,7 +137,7 @@ controller_applications:
ignore_files: [controller_config.yml.template]
extensions: ["yml"]
roles:
- {role: infra.aap_configuration.applications, when: controller_applications is defined}
- {role: infra.aap_configuration.applications, when: aap_applications is defined}
```
## License
Expand Down
4 changes: 2 additions & 2 deletions roles/controller_applications/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
# a list of dictionaries describing the Controller applications
controller_applications: []
aap_applications: []
controller_configuration_applications_secure_logging: "{{ aap_configuration_secure_logging | default('false') }}"
controller_configuration_applications_async_retries: "{{ aap_configuration_async_retries | default(30) }}"
controller_configuration_applications_async_delay: "{{ aap_configuration_async_delay | default(1) }}"
controller_configuration_applications_loop_delay: "{{ aap_configuration_loop_delay | default(0) }}"
aap_configuration_async_dir: null
controller_configuration_applications_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
controller_configuration_applications_enforce_defaults: "{{ aap_configuration_enforce_defaults | default(false) }}"
...
2 changes: 1 addition & 1 deletion roles/controller_applications/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ argument_specs:
main:
short_description: An Ansible Role to create Applications on Ansible Controller.
options:
controller_applications:
aap_applications:
description: Data structure describing your applications
type: list
elements: dict
Expand Down
2 changes: 1 addition & 1 deletion roles/controller_applications/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
# issue_tracker_url: http://example.com/issue/tracker
license: GPL-3.0-or-later

min_ansible_version: 2.15.0
min_ansible_version: 2.16.0

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
Expand Down
2 changes: 1 addition & 1 deletion roles/controller_applications/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
request_timeout: "{{ aap_request_timeout | default(omit, true) }}"
controller_host: "{{ aap_hostname | default(omit, true) }}"
validate_certs: "{{ aap_validate_certs | default(omit) }}"
loop: "{{ applications if applications is defined else controller_applications }}"
loop: "{{ aap_applications }}"
loop_control:
loop_var: "__application_item"
label: "{{ __operation.verb }} Controller Application {{ __application_item.name }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
controller_applications:
aap_applications:
- name: controller_application-app1
organization: Satellite
authorization_grant_type: password
Expand Down
2 changes: 1 addition & 1 deletion roles/controller_applications/tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
extensions: ["yml"]

roles:
- {role: ../.., when: controller_applications is defined}
- {role: ../.., when: aap_applications is defined}
...
2 changes: 1 addition & 1 deletion roles/controller_bulk_host_create/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
# issue_tracker_url: http://example.com/issue/tracker
license: GPL-3.0-or-later

min_ansible_version: 2.15.0
min_ansible_version: 2.16.0

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
Expand Down
2 changes: 1 addition & 1 deletion roles/controller_bulk_job_launch/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
# issue_tracker_url: http://example.com/issue/tracker
license: GPL-3.0-or-later

min_ansible_version: 2.15.0
min_ansible_version: 2.16.0

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
Expand Down
4 changes: 2 additions & 2 deletions roles/controller_credential_input_sources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ This should be enabled to enforce configuration and prevent configuration drift.

Enabling this will enforce configurtion without specifying every option in the configuration files.

'controller_configuration_credential_input_sources_enforce_defaults' defaults to the value of 'controller_configuration_enforce_defaults' if it is not explicitly called. This allows for enforced defaults to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it.
'controller_configuration_credential_input_sources_enforce_defaults' defaults to the value of 'aap_configuration_enforce_defaults' if it is not explicitly called. This allows for enforced defaults to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it.

|Variable Name|Default Value|Required|Description|
|:---:|:---:|:---:|:---:|
|`controller_configuration_credential_input_sources_enforce_defaults`|`False`|no|Whether or not to enforce default option values on only the applications role|
|`controller_configuration_enforce_defaults`|`False`|no|This variable enables enforced default values as well, but is shared across multiple roles, see above.|
|`aap_configuration_enforce_defaults`|`False`|no|This variable enables enforced default values as well, but is shared across multiple roles, see above.|

### Secure Logging Variables

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ controller_configuration_credential_input_sources_async_retries: "{{ aap_configu
controller_configuration_credential_input_sources_async_delay: "{{ aap_configuration_async_delay | default(1) }}"
controller_configuration_credential_input_sources_loop_delay: "{{ aap_configuration_loop_delay | default(0) }}"
aap_configuration_async_dir: null
controller_configuration_credential_input_sources_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
controller_configuration_credential_input_sources_enforce_defaults: "{{ aap_configuration_enforce_defaults | default(false) }}"
...
2 changes: 1 addition & 1 deletion roles/controller_credential_input_sources/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
# issue_tracker_url: http://example.com/issue/tracker
license: GPL-3.0-or-later

min_ansible_version: 2.15.0
min_ansible_version: 2.16.0

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
Expand Down
4 changes: 2 additions & 2 deletions roles/controller_credential_types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ This should be enabled to enforce configuration and prevent configuration drift.

Enabling this will enforce configurtion without specifying every option in the configuration files.

'controller_configuration_credential_types_enforce_defaults' defaults to the value of 'controller_configuration_enforce_defaults' if it is not explicitly called. This allows for enforced defaults to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it.
'controller_configuration_credential_types_enforce_defaults' defaults to the value of 'aap_configuration_enforce_defaults' if it is not explicitly called. This allows for enforced defaults to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it.

|Variable Name|Default Value|Required|Description|
|:---:|:---:|:---:|:---:|
|`controller_configuration_credential_types_enforce_defaults`|`False`|no|Whether or not to enforce default option values on only the applications role|
|`controller_configuration_enforce_defaults`|`False`|no|This variable enables enforced default values as well, but is shared across multiple roles, see above.|
|`aap_configuration_enforce_defaults`|`False`|no|This variable enables enforced default values as well, but is shared across multiple roles, see above.|

### Secure Logging Variables

Expand Down
2 changes: 1 addition & 1 deletion roles/controller_credential_types/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ controller_configuration_credential_types_async_retries: "{{ aap_configuration_a
controller_configuration_credential_types_async_delay: "{{ aap_configuration_async_delay | default(1) }}"
controller_configuration_credential_types_loop_delay: "{{ aap_configuration_loop_delay | default(0) }}"
aap_configuration_async_dir: null
controller_configuration_credential_types_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
controller_configuration_credential_types_enforce_defaults: "{{ aap_configuration_enforce_defaults | default(false) }}"
...
2 changes: 1 addition & 1 deletion roles/controller_credential_types/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
# issue_tracker_url: http://example.com/issue/tracker
license: GPL-3.0-or-later

min_ansible_version: 2.15.0
min_ansible_version: 2.16.0

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
Expand Down
4 changes: 2 additions & 2 deletions roles/controller_credentials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ This should be enabled to enforce configuration and prevent configuration drift.

Enabling this will enforce configurtion without specifying every option in the configuration files.

'controller_configuration_credentials_enforce_defaults' defaults to the value of 'controller_configuration_enforce_defaults' if it is not explicitly called. This allows for enforced defaults to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it.
'controller_configuration_credentials_enforce_defaults' defaults to the value of 'aap_configuration_enforce_defaults' if it is not explicitly called. This allows for enforced defaults to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it.

|Variable Name|Default Value|Required|Description|
|:---:|:---:|:---:|:---:|
|`controller_configuration_credentials_enforce_defaults`|`False`|no|Whether or not to enforce default option values on only the applications role|
|`controller_configuration_enforce_defaults`|`False`|no|This variable enables enforced default values as well, but is shared across multiple roles, see above.|
|`aap_configuration_enforce_defaults`|`False`|no|This variable enables enforced default values as well, but is shared across multiple roles, see above.|

### Secure Logging Variables

Expand Down
2 changes: 1 addition & 1 deletion roles/controller_credentials/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ controller_configuration_credentials_async_retries: "{{ aap_configuration_async_
controller_configuration_credentials_async_delay: "{{ aap_configuration_async_delay | default(1) }}"
controller_configuration_credentials_loop_delay: "{{ aap_configuration_loop_delay | default(0) }}"
aap_configuration_async_dir: null
controller_configuration_credentials_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
controller_configuration_credentials_enforce_defaults: "{{ aap_configuration_enforce_defaults | default(false) }}"
...
2 changes: 1 addition & 1 deletion roles/controller_credentials/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
# issue_tracker_url: http://example.com/issue/tracker
license: GPL-3.0-or-later

min_ansible_version: 2.15.0
min_ansible_version: 2.16.0

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
Expand Down
4 changes: 2 additions & 2 deletions roles/controller_execution_environments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ This should be enabled to enforce configuration and prevent configuration drift.

Enabling this will enforce configurtion without specifying every option in the configuration files.

'controller_configuration_execution_environments_enforce_defaults' defaults to the value of 'controller_configuration_enforce_defaults' if it is not explicitly called. This allows for enforced defaults to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it.
'controller_configuration_execution_environments_enforce_defaults' defaults to the value of 'aap_configuration_enforce_defaults' if it is not explicitly called. This allows for enforced defaults to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it.

|Variable Name|Default Value|Required|Description|
|:---:|:---:|:---:|:---:|
|`controller_configuration_execution_environments_enforce_defaults`|`False`|no|Whether or not to enforce default option values on only the applications role|
|`controller_configuration_enforce_defaults`|`False`|no|This variable enables enforced default values as well, but is shared across multiple roles, see above.|
|`aap_configuration_enforce_defaults`|`False`|no|This variable enables enforced default values as well, but is shared across multiple roles, see above.|

### Secure Logging Variables

Expand Down
2 changes: 1 addition & 1 deletion roles/controller_execution_environments/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ controller_configuration_execution_environments_async_retries: "{{ aap_configura
controller_configuration_execution_environments_async_delay: "{{ aap_configuration_async_delay | default(1) }}"
controller_configuration_execution_environments_loop_delay: "{{ aap_configuration_loop_delay | default(0) }}"
aap_configuration_async_dir: null
controller_configuration_execution_environments_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
controller_configuration_execution_environments_enforce_defaults: "{{ aap_configuration_enforce_defaults | default(false) }}"
...
2 changes: 1 addition & 1 deletion roles/controller_execution_environments/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
# issue_tracker_url: http://example.com/issue/tracker
license: GPL-3.0-or-later

min_ansible_version: 2.15.0
min_ansible_version: 2.16.0

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
Expand Down
4 changes: 2 additions & 2 deletions roles/controller_host_groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ This should be enabled to enforce configuration and prevent configuration drift.

Enabling this will enforce configurtion without specifying every option in the configuration files.

'controller_configuration_groups_enforce_defaults' defaults to the value of 'controller_configuration_enforce_defaults' if it is not explicitly called. This allows for enforced defaults to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it.
'controller_configuration_groups_enforce_defaults' defaults to the value of 'aap_configuration_enforce_defaults' if it is not explicitly called. This allows for enforced defaults to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it.

|Variable Name|Default Value|Required|Description|
|:---:|:---:|:---:|:---:|
|`controller_configuration_groups_enforce_defaults`|`False`|no|Whether or not to enforce default option values on only the applications role|
|`controller_configuration_enforce_defaults`|`False`|no|This variable enables enforced default values as well, but is shared across multiple roles, see above.|
|`aap_configuration_enforce_defaults`|`False`|no|This variable enables enforced default values as well, but is shared across multiple roles, see above.|

### Secure Logging Variables

Expand Down
2 changes: 1 addition & 1 deletion roles/controller_host_groups/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ controller_configuration_group_async_retries: "{{ aap_configuration_async_retrie
controller_configuration_group_async_delay: "{{ aap_configuration_async_delay | default(1) }}"
controller_configuration_group_loop_delay: "{{ aap_configuration_loop_delay | default(0) }}"
aap_configuration_async_dir: null
controller_configuration_groups_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
controller_configuration_groups_enforce_defaults: "{{ aap_configuration_enforce_defaults | default(false) }}"
...
2 changes: 1 addition & 1 deletion roles/controller_host_groups/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ galaxy_info:
# issue_tracker_url: http://example.com/issue/tracker
license: GPL-3.0-or-later

min_ansible_version: 2.15.0
min_ansible_version: 2.16.0

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
Expand Down
Loading

0 comments on commit aa087bc

Please sign in to comment.