-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from sean-m-sullivan/devel
FQDN prep, additional workflow, other issues fixed
- Loading branch information
Showing
48 changed files
with
429 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: "v1" | ||
kind: "PersistentVolumeClaim" | ||
metadata: | ||
name: "awx-github-postgres" | ||
spec: | ||
accessModes: | ||
- "ReadWriteOnce" | ||
resources: | ||
requests: | ||
storage: "5Gi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ ansible | |
docker | ||
docker-compose | ||
jmespath | ||
requests | ||
requests-oauthlib | ||
openshift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python3" | ||
|
||
[all:vars] | ||
|
||
dockerhub_base=ansible | ||
|
||
openshift_host=https://api.crc.testing:6443 | ||
openshift_project=awx-github | ||
openshift_user=developer | ||
openshift_skip_tls_verify=True | ||
openshift_pg_pvc_name=awx-github-postgres | ||
|
||
pg_username=awx | ||
pg_password=awxpass | ||
pg_database=awx | ||
pg_port=5432 | ||
|
||
|
||
admin_user=admin | ||
admin_password=password | ||
|
||
create_preload_data=false | ||
|
||
secret_key=awxsecret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
name: Run AWX Openshift Test Playbooks | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
Integration-test: | ||
|
||
runs-on: [self-hosted, linux, awx] | ||
|
||
steps: | ||
- name: "Checkout Project" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "Clone AWX" | ||
run: cd .github && git clone https://github.com/ansible/awx.git | ||
|
||
- name: Install oc | ||
uses: redhat-actions/oc-installer@v1 | ||
with: | ||
version: '4.6' | ||
|
||
- name: Authenticate and set context | ||
uses: redhat-actions/oc-login@v1 | ||
|
||
with: | ||
# URL to your OpenShift cluster. | ||
# Refer to Step 2. | ||
openshift_server_url: https://api.crc.testing:6443 | ||
|
||
# Credentials, if desired instead of token. | ||
# Username and password override token if they are set. | ||
openshift_username: ${{ secrets.OPENSHIFT_USER }} | ||
openshift_password: ${{ secrets.OPENSHIFT_PASSWORD }} | ||
|
||
# Disables SSL cert checking. Use this if you don't have the certificate authority data. | ||
insecure_skip_tls_verify: true | ||
|
||
- name: "Create Awx project" | ||
run: oc new-project awx-github | ||
|
||
- name: "Create Persistent Volume Claim" | ||
run: oc create -f .github/openshift/awx_pvc.yml | ||
|
||
- name: "Copy Awx inventory to install dir" | ||
run: cp .github/tower_install_inventories/openshift_awx .github/awx/installer/openshift | ||
|
||
- name: "Install dependencies" | ||
run: pip3 install -r .github/requirements.txt | ||
|
||
- name: Ansible Version | ||
run: ansible --version | ||
|
||
- name: "Build AWX stack" | ||
run: cd .github/awx/installer && ansible-playbook -i openshift install.yml -e openshift_password=${{ secrets.OPENSHIFT_PASSWORD }} -e docker_registry_password=$(oc whoami -t) | ||
|
||
- name: "Install Galaxy dependencies" | ||
run: ansible-galaxy collection install -r .github/collections/requirements.yml | ||
|
||
- name: "Perform playbook tests" | ||
run: ansible-playbook playbooks/configure_tower.yml --skip-tags "tower_license" -e tower_hostname=https://awx-web-svc-awx-github.apps-crc.testing -e tower_username=admin -e tower_password=password | ||
|
||
- name: "Perform export model playbook tests" | ||
run: ansible-playbook playbooks/configure_tower_export_model.yml -e tower_hostname=https://awx-web-svc-awx-github.apps-crc.testing -e tower_username=admin -e tower_password=password | ||
|
||
- name: "Delete Awx project" | ||
run: oc delete project awx-github | ||
if: ${{ always() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
tower_instance_groups: | ||
- name: test_instance_group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# tower_configuration_*********** | ||
## Description | ||
An Ansible Role to create ******* in Ansible Tower. | ||
|
||
## Requirements | ||
ansible-galaxy collection install -r tests/collections/requirements.yml to be installed | ||
Currently: | ||
awx.awx | ||
|
||
## Variables | ||
|Variable Name|Default Value|Required|Description|Example| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|`tower_state`|"present"|no|The state all objects will take unless overriden by object default|'absent'| | ||
|`tower_hostname`|""|yes|URL to the Ansible Tower Server.|127.0.0.1| | ||
|`validate_certs`|`False`|no|Whether or not to validate the Ansible Tower Server's SSL certificate.|| | ||
|`tower_username`|""|yes|Admin User on the Ansible Tower Server.|| | ||
|`tower_password`|""|yes|Tower Admin User's password on the Ansible Tower Server. This should be stored in an Ansible Vault at vars/tower-secrets.yml or elsewhere and called from a parent playbook.|| | ||
|`tower_oauthtoken`|""|yes|Tower Admin User's token on the Ansible Tower Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook.|| | ||
|`tower_************`|`see below`|yes|Data structure describing your orgainzation or orgainzations Described below.|| | ||
|
||
### Secure Logging Variables | ||
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 ******* task does not include sensitive information. | ||
tower_configuration_*******_secure_logging defaults to the value of tower_configuration_secure_logging if it is not explicitly called. This allows for secure logging to be toggled for the entire suite of tower configuration roles with a single variable, or for the user to selectively use it. | ||
|
||
|Variable Name|Default Value|Required|Description| | ||
|:---:|:---:|:---:|:---:| | ||
|`tower_configuration_*******_secure_logging`|`False`|no|Whether or not to include the sensitive ******* role tasks in the log. Set this value to `True` if you will be providing your sensitive values from elsewhere.| | ||
|`tower_configuration_secure_logging`|`False`|no|This variable enables secure logging as well, but is shared accross multiple roles, see above.| | ||
|
||
## Data Structure | ||
### Variables | ||
|Variable Name|Default Value|Required|Type|Description| | ||
|:---:|:---:|:---:|:---:|:---:| | ||
|`name`|""|yes|str|Name of Job Template| | ||
|`new_name`|""|str|no|Setting this option will change the existing name (looked up via the name field).| | ||
|`description`|`False`|no|str|Description to use for the job template.| | ||
|
||
|`state`|`present`|no|str|Desired state of the resource.| | ||
|
||
|
||
|
||
### Standard Project Data Structure | ||
#### Json Example | ||
```json | ||
--- | ||
|
||
``` | ||
#### Yaml Example | ||
```yaml | ||
--- | ||
|
||
``` | ||
|
||
## Playbook Examples | ||
### Standard Role Usage | ||
```yaml | ||
|
||
``` | ||
## License | ||
[MIT](LICENSE) | ||
|
||
## Author | ||
[************](************) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
|
||
# These are the default variables common to most tower_configuration and _utilities roles | ||
# You shouldn't need to define them again and again but they should be defined | ||
#tower_hostname: "{{ inventory_hostname }}" | ||
#tower_username: "admin" | ||
#tower_password: "" | ||
#tower_oauthtoken: "" | ||
#tower_config_file: "" | ||
#tower_validate_certs: false | ||
tower_instance_groups: [] | ||
#- name: "instance_group_name" # mandatory | ||
# new_name: "new_name" # optional | ||
# credential: "credential_name" # optional | ||
# policy_instance_percentage: 100 # optional, integer percentage | ||
# policy_instance_minimum: 100 # optional, integer number of instances | ||
# policy_instance_list: "exact_match_instances" # optional | ||
# pod_spec_override: "pod_specfication" # optional | ||
# instances: [] # List of instances to assign to group | ||
# state: # optional, choices: present, absent | ||
# These are the default variables specific to the **** role | ||
|
||
tower_configuration_instance_groups_secure_logging: "{{tower_configuration_secure_logging | default(false)}}" |
Oops, something went wrong.