Skip to content

Commit

Permalink
renaming to platform variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-m-sullivan committed Oct 13, 2024
1 parent 6dd149c commit 8a76c69
Show file tree
Hide file tree
Showing 233 changed files with 1,787 additions and 1,635 deletions.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: infra
name: aap_configuration
version: 3.0.0
version: 1.0.0
description: A collection of roles to manage Ansible Controller
readme: README.md
authors:
Expand Down
8 changes: 4 additions & 4 deletions roles/controller_ad_hoc_command/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Currently:
|`controller_state`|"present"|no|The state all objects will take unless overridden by object default|'absent'|
|`controller_hostname`|""|yes|URL to the Ansible Controller Server.|127.0.0.1|
|`controller_validate_certs`|`True`|no|Whether or not to validate the Ansible Controller Server's SSL certificate.||
|`controller_username`|""|no|Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified.||
|`platform_username`|""|no|Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified.||
|`controller_password`|""|no|Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.||
|`controller_oauthtoken`|""|no|Controller Admin User's token on the Ansible Controller 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.||
|`controller_request_timeout`|`10`|no|Specify the timeout in seconds Ansible should use in requests to the controller host.||
Expand All @@ -30,12 +30,12 @@ Currently:
The following Variables compliment each other.
If Both variables are not set, secure logging defaults to false.
The role defaults to False as normally the add ad hoc commands task does not include sensitive information.
controller_configuration_ad_hoc_command_secure_logging defaults to the value of controller_configuration_secure_logging if it is not explicitly called. This allows for secure logging 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_ad_hoc_command_secure_logging defaults to the value of platform_configuration_secure_logging if it is not explicitly called. This allows for secure logging 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_ad_hoc_command_secure_logging`|`False`|no|Whether or not to include the sensitive ad_hoc_command role tasks in the log. Set this value to `True` if you will be providing your sensitive values from elsewhere.|
|`controller_configuration_secure_logging`|`False`|no|This variable enables secure logging as well, but is shared across multiple roles, see above.|
|`platform_configuration_secure_logging`|`False`|no|This variable enables secure logging as well, but is shared across multiple roles, see above.|

## Data Structure

Expand Down Expand Up @@ -85,7 +85,7 @@ controller_ad_hoc_commands:
connection: local
# Define following vars here, or in controller_configs/controller_auth.yml
# controller_hostname: ansible-controller-web-svc-test-project.example.com
# controller_username: admin
# platform_username: admin
# controller_password: changeme
pre_tasks:
- name: Include vars from controller_configs directory
Expand Down
2 changes: 1 addition & 1 deletion roles/controller_ad_hoc_command/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
# These are the default variables specific to the ad_hoc_command role
controller_configuration_ad_hoc_command_secure_logging: "{{ controller_configuration_secure_logging | default('false') }}"
controller_configuration_ad_hoc_command_secure_logging: "{{ platform_configuration_secure_logging | default('false') }}"
...
26 changes: 13 additions & 13 deletions roles/controller_ad_hoc_command/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,45 +76,45 @@ argument_specs:

# No_log variables
controller_configuration_ad_hoc_command_secure_logging:
default: "{{ controller_configuration_secure_logging | default(false) }}"
default: "{{ platform_configuration_secure_logging | default(false) }}"
required: false
type: bool
description: Whether or not to include the sensitive ad_hoc_command role tasks in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere.
controller_configuration_secure_logging:
platform_configuration_secure_logging:
default: false
required: false
type: bool
description: This variable enables secure logging across all roles as a default.

# Generic across all roles
controller_state:
platform_state:
default: present
required: false
description: The state all objects will take unless overridden by object default
type: str
controller_hostname:
platform_hostname:
default: None
required: false
description: URL to the Ansible Controller Server.
description: URL to the Ansible Automation Platform Server.
type: str
controller_validate_certs:
platform_validate_certs:
default: true
required: false
description: Whether or not to validate the Ansible Controller Server's SSL certificate.
description: Whether or not to validate the Ansible Automation Platform Server's SSL certificate.
type: str
controller_username:
platform_username:
default: None
required: false
description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified.
description: Admin User on the Ansible Automation Platform Server. Either username / password or oauthtoken need to be specified.
type: str
controller_password:
platform_password:
default: None
required: false
description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.
description: Controller Admin User's password on the Ansible Automation Platform Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.
type: str
controller_oauthtoken:
platform_token:
default: None
required: false
description: Controller Admin User's token on the Ansible Controller 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.
description: 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.
type: str
...
13 changes: 6 additions & 7 deletions roles/controller_ad_hoc_command/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@
timeout: "{{ __ad_hoc_command_item.timeout | default(omit, true) }}"

# Role Standard Options
controller_username: "{{ controller_username | default(omit, true) }}"
controller_password: "{{ controller_password | default(omit, true) }}"
controller_oauthtoken: "{{ controller_oauthtoken | default(omit, true) }}"
request_timeout: "{{ controller_request_timeout | default(omit, true) }}"
controller_host: "{{ controller_hostname | default(omit, true) }}"
controller_config_file: "{{ controller_config_file | default(omit, true) }}"
validate_certs: "{{ controller_validate_certs | default(omit) }}"
controller_username: "{{ platform_username | default(omit, true) }}"
controller_password: "{{ platform_password | default(omit, true) }}"
controller_oauthtoken: "{{ platform_oauthtoken | default(omit, true) }}"
request_timeout: "{{ platform_request_timeout | default(omit, true) }}"
controller_host: "{{ controller_host | default(omit, true) }}"
validate_certs: "{{ platform_validate_certs | default(omit) }}"
loop: "{{ controller_ad_hoc_commands }}"
loop_control:
loop_var: "__ad_hoc_command_item"
Expand Down
2 changes: 1 addition & 1 deletion roles/controller_ad_hoc_command/tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
vars:
controller_validate_certs: false
controller_hostname: controller.example.com
controller_username: admin
platform_username: admin
controller_password: changeme

collections:
Expand Down
8 changes: 4 additions & 4 deletions roles/controller_ad_hoc_command_cancel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Currently:
|`controller_state`|"present"|no|The state all objects will take unless overridden by object default|'absent'|
|`controller_hostname`|""|yes|URL to the Ansible Controller Server.|127.0.0.1|
|`controller_validate_certs`|`True`|no|Whether or not to validate the Ansible Controller Server's SSL certificate.||
|`controller_username`|""|no|Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified.||
|`platform_username`|""|no|Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified.||
|`controller_password`|""|no|Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.||
|`controller_oauthtoken`|""|no|Controller Admin User's token on the Ansible Controller 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.||
|`controller_request_timeout`|`10`|no|Specify the timeout in seconds Ansible should use in requests to the controller host.||
Expand All @@ -30,12 +30,12 @@ Currently:
The following Variables compliment each other.
If Both variables are not set, secure logging defaults to false.
The role defaults to False as normally the add ad hoc commands cancel task does not include sensitive information.
controller_configuration_ad_hoc_command_secure_logging defaults to the value of controller_configuration_secure_logging if it is not explicitly called. This allows for secure logging 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_ad_hoc_command_secure_logging defaults to the value of platform_configuration_secure_logging if it is not explicitly called. This allows for secure logging 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_ad_hoc_command_cancel_secure_logging`|`False`|no|Whether or not to include the sensitive ad_hoc_command_cancel role tasks in the log. Set this value to `True` if you will be providing your sensitive values from elsewhere.|
|`controller_configuration_secure_logging`|`False`|no|This variable enables secure logging as well, but is shared across multiple roles, see above.|
|`platform_configuration_secure_logging`|`False`|no|This variable enables secure logging as well, but is shared across multiple roles, see above.|

## Data Structure

Expand Down Expand Up @@ -77,7 +77,7 @@ controller_ad_hoc_commands_cancel:
connection: local
# Define following vars here, or in controller_configs/controller_auth.yml
# controller_hostname: ansible-controller-web-svc-test-project.example.com
# controller_username: admin
# platform_username: admin
# controller_password: changeme
pre_tasks:
- name: Include vars from controller_configs directory
Expand Down
2 changes: 1 addition & 1 deletion roles/controller_ad_hoc_command_cancel/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
# These are the default variables specific to the ad_hoc_command_cancel role
controller_configuration_ad_hoc_command_cancel_secure_logging: "{{ controller_configuration_secure_logging | default('false') }}"
controller_configuration_ad_hoc_command_cancel_secure_logging: "{{ platform_configuration_secure_logging | default('false') }}"
...
26 changes: 13 additions & 13 deletions roles/controller_ad_hoc_command_cancel/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,45 +30,45 @@ argument_specs:

# No_log variables
controller_configuration_ad_hoc_command_cancel_secure_logging:
default: "{{ controller_configuration_secure_logging | default(false) }}"
default: "{{ platform_configuration_secure_logging | default(false) }}"
required: false
type: bool
description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere.
controller_configuration_secure_logging:
platform_configuration_secure_logging:
default: false
required: false
type: bool
description: This variable enables secure logging across all roles as a default.

# Generic across all roles
controller_state:
platform_state:
default: present
required: false
description: The state all objects will take unless overridden by object default
type: str
controller_hostname:
platform_hostname:
default: None
required: false
description: URL to the Ansible Controller Server.
description: URL to the Ansible Automation Platform Server.
type: str
controller_validate_certs:
platform_validate_certs:
default: true
required: false
description: Whether or not to validate the Ansible Controller Server's SSL certificate.
description: Whether or not to validate the Ansible Automation Platform Server's SSL certificate.
type: str
controller_username:
platform_username:
default: None
required: false
description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified.
description: Admin User on the Ansible Automation Platform Server. Either username / password or oauthtoken need to be specified.
type: str
controller_password:
platform_password:
default: None
required: false
description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.
description: Controller Admin User's password on the Ansible Automation Platform Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.
type: str
controller_oauthtoken:
platform_token:
default: None
required: false
description: Controller Admin User's token on the Ansible Controller 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.
description: 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.
type: str
...
13 changes: 6 additions & 7 deletions roles/controller_ad_hoc_command_cancel/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
timeout: "{{ __ad_hoc_command_cancel_item.timeout | default(omit, true) }}"

# Role Standard Options
controller_username: "{{ controller_username | default(omit, true) }}"
controller_password: "{{ controller_password | default(omit, true) }}"
controller_oauthtoken: "{{ controller_oauthtoken | default(omit, true) }}"
request_timeout: "{{ controller_request_timeout | default(omit, true) }}"
controller_host: "{{ controller_hostname | default(omit, true) }}"
controller_config_file: "{{ controller_config_file | default(omit, true) }}"
validate_certs: "{{ controller_validate_certs | default(omit) }}"
controller_username: "{{ platform_username | default(omit, true) }}"
controller_password: "{{ platform_password | default(omit, true) }}"
controller_oauthtoken: "{{ platform_oauthtoken | default(omit, true) }}"
request_timeout: "{{ platform_request_timeout | default(omit, true) }}"
controller_host: "{{ controller_host | default(omit, true) }}"
validate_certs: "{{ platform_validate_certs | default(omit) }}"
loop: "{{ controller_ad_hoc_commands_cancel }}"
loop_control:
loop_var: "__ad_hoc_command_cancel_item"
Expand Down
2 changes: 1 addition & 1 deletion roles/controller_ad_hoc_command_cancel/tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
vars:
controller_validate_certs: false
controller_hostname: controller.example.com
controller_username: admin
platform_username: admin
controller_password: changeme

collections:
Expand Down
Loading

0 comments on commit 8a76c69

Please sign in to comment.