Skip to content

Commit 93578c4

Browse files
djdanielssongithub-actions[bot]
authored andcommitted
Apply automatic changes
1 parent e6e1466 commit 93578c4

File tree

121 files changed

+14924
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+14924
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
layout: default
3+
title: aap_backup
4+
parent: infra.aap_utilities
5+
---
6+
7+
# infra.aap\_utilities.backup
8+
9+
Ansible role to backup Ansible Automation Platform.
10+
11+
## Requirements
12+
13+
None
14+
15+
## Role Variables
16+
17+
Available variables are listed below, along with default values defined (see defaults/main.yml)
18+
19+
```yaml
20+
aap_setup_prep_setup_dir: # Must be set, though if the aap_setup_prepare role has been run prior, a fact will be set.
21+
aap_backup_dest: "/root"
22+
```
23+
24+
## Example Playbook
25+
26+
The following playbook and accompanying vars file containing the defined seed objects can be invoked in the following manner.
27+
28+
```sh
29+
ansible-playbook playbook.yml -e @aap_vars.yml controller
30+
```
31+
32+
```yaml
33+
# Playbook to backup Automation controller
34+
35+
- name: Backup Automation controller
36+
hosts: localhost
37+
become: true
38+
vars:
39+
aap_setup_prep_setup_dir: /root/ansible-automation-platform-installer/
40+
aap_backup_dest: /aap_backups/
41+
roles:
42+
- infra.aap_utilities.aap_backup
43+
```
44+
45+
## License
46+
47+
[GPLv3+0](https://github.com/redhat-cop/aap_utilities#licensing)
48+
49+
## Author Information
50+
51+
Sean Sullivan
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
layout: default
3+
title: aap_certs
4+
parent: infra.aap_utilities
5+
---
6+
7+
# infra.aap\_utilities.aap\_certs
8+
9+
Ansible role to install SSL certificates for AAP automation controller and/or automation hub and/or EDA controller.
10+
11+
Certificates are only installed if the underlying destination directory does already exist,
12+
this allows to point the role at all servers in the cluster.
13+
14+
Note it is also possible to deploy the certificates at install time with the proper inventory variables.
15+
16+
## Requirements
17+
18+
The certificates must have been created with certificate and key.
19+
20+
## Role Variables
21+
22+
Available variables are listed below, along with default values defined (see [defaults](defaults/main.yml)).
23+
24+
Variables to point at the source certificates and keys for controller,
25+
respective automation hub.
26+
They are undefined by default which means that no certificate is installed:
27+
28+
```yaml
29+
aap_certs_controller_ssl_cert: "{{ playbook_dir }}/tower.cert"
30+
aap_certs_controller_ssl_key: "{{ playbook_dir }}/tower.key"
31+
aap_certs_autohub_ssl_cert: "{{ playbook_dir }}/pulp.cert"
32+
aap_certs_autohub_ssl_key: "{{ playbook_dir }}/pulp.key"
33+
aap_certs_eda_ssl_cert: "{{ playbook_dir }}/server.cert"
34+
aap_certs_eda_ssl_key: "{{ playbook_dir }}/server.key"
35+
36+
```
37+
38+
The content of the certificates and keys can also be set rather than specifying a file.
39+
This is useful when you're using a secrets backend like HashiCorp Vault.
40+
**Note that these are each mutually exclusive with the variables above.**
41+
42+
```yaml
43+
44+
```
45+
46+
The following variable defines if the old certificates/keys should be backed-up:
47+
48+
```yaml
49+
aap_certs_create_backup: false
50+
```
51+
52+
## Example Playbook
53+
54+
The following playbook and accompanying vars file containing the defined seed objects can be invoked in the following manner.
55+
56+
```sh
57+
ansible-playbook playbook.yml -e @aap_vars.yml
58+
```
59+
60+
```yaml
61+
- name: Install AAP certificates
62+
hosts: aap_servers
63+
become: true
64+
vars:
65+
aap_certs_controller_ssl_cert: "{{ playbook_dir }}/tower.cert"
66+
aap_certs_controller_ssl_key: "{{ playbook_dir }}/tower.key"
67+
aap_certs_autohub_ssl_cert: ""
68+
aap_certs_autohub_ssl_key: ""
69+
roles:
70+
- infra.aap_utilities.aap_certs
71+
```
72+
73+
## License
74+
75+
[GPLv3+0](https://github.com/redhat-cop/aap_utilities#licensing)
76+
77+
## Author Information
78+
79+
Tom Page
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
layout: default
3+
title: aap_ocp_install
4+
parent: infra.aap_utilities
5+
---
6+
7+
# infra.aap_utilities.aap_ocp_install
8+
9+
A role to install Ansible Automation Platform (AAP) 2.x on OpenShift using the operator.
10+
11+
## Requirements
12+
13+
This role requires the `kubernetes` (version 12.0.0 or later) Python module.
14+
In addition the kubernetes.core and redhat.openshift Ansible collections are required.
15+
16+
## Role Variables
17+
18+
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
19+
20+
| Variable Name | Required | Default Value | Description |
21+
| aap_ocp_install_namespace | Yes | None | Namespace to create operator, controller, and hub in |
22+
| aap_ocp_install_create_namespace | No | None | Create the Namespace for the operator, controller and hub. Valid values are: `true`, `false` |
23+
| aap_ocp_install_namespace_manifest_overrides | No | None | Namespace to create operator, controller, and hub in |
24+
| aap_ocp_install_connection | Yes | None | Dictionary containing keys defined in the `connection variables table` |
25+
| aap_ocp_install_operator | Yes* | None | YAML Manifest to override the generated operator `Namespace` resource |
26+
| aap_ocp_install_controller | Yes* | None | Dictionary containing keys defined in the `controller variables table` |
27+
| aap_ocp_install_hub | Yes* | None | Dictionary containing keys defined in the `hub variables table` |
28+
29+
\* Variable and required keys must be defined when the type of tag is specified (e.g. `--tags controller` requires the aap_ocp_install_controller variable be defined).
30+
If the variable is omitted the corresponding component will not be installed (e.g. if only aap_ocp_install_hub variable is defined then the operator and controller installation will be skipped)
31+
32+
### aap_ocp_install_connection keys
33+
34+
| Key Name | Required | Default Value | Description |
35+
| host | Yes | None | OCP cluster to create the AAP objects in |
36+
| username | Yes* | None | Username to use for authenticating with OCP |
37+
| password | Yes* | None | Password to use for authenticating with OCP |
38+
| api_key | Yes* | None | OCP API Token |
39+
| validate_certs | | None | Validate SSL certificates. Valid values are: `true`, `false` |
40+
41+
\* Either `api_key` or `username` and `password` can be specified.
42+
43+
### aap_ocp_install_operator keys
44+
45+
| Key Name | Required | Default Value | Description |
46+
| channel | Yes | None | Channel to subscribe (e.g. stable-2.2 or stable-2.2-cluster-scoped) |
47+
| approval | | Automatic | Update approval method. Valid values are Automatic or Manual. |
48+
| operatorgroup_create | | true | Create the `OperatorGroup` for the Operator |
49+
| operatorgroup_manifest_overrides | | | YAML Manifest to override the generated `OperatorGroup` resource |
50+
| subscription_manifest_overrides | | | YAML Manifest to override the generated `Subscription` resource |
51+
52+
> ℹ️ **NOTE**
53+
>
54+
> When `approval` is set to `Manual` the operator will be installed with `Automatic` approval and then after installation the approval will be updated to Manual.
55+
56+
### aap_ocp_install_controller keys
57+
58+
| Key Name | Required | Default Value | Description |
59+
| instance_name | Yes | None | Name of the controller instance to create |
60+
| namespace | | None | Name of the namespace to create the controller instance in. If not specified `aap_ocp_install_namespace` will be used. |
61+
| namespace_manifest_overrides | | None | YAML Manifest to override the generated `Namespace` resource for the controller if the `namespace` key is defined |
62+
| admin_user | | admin | Username to use for the admin account |
63+
| replicas | | 1 | How many replicas to create. |
64+
| garbage_collect_secrets | | false | Whether or not to remove secrets upon instance removal |
65+
| image_pull_policy | | IfNotPresent | The image pull policy |
66+
| create_preload_data | | true | Whether or not to preload data upon instance creation |
67+
| projects_persistence | | false | Whether or not the /var/lib/projects directory will be persistent |
68+
| projects_storage_size | | 8Gi | Size of /var/lib/projects persistent volume claim (PVC) |
69+
| link_text | | Automation Controller (<INSTANCE_NAME>) | Text used for creating the OCP application link |
70+
| controller_manifest_overrides | | None | YAML Manifest to override the generated `AutomationController` resource link |
71+
| consolelink_manifest_overrides | | None | YAML Manifest to override the generated `ConsoleLink` resource |
72+
73+
### aap_ocp_install_hub keys
74+
75+
| Key Name | Required | Default Value | Description |
76+
| instance_name | Yes | None | Name of the hub instance to create |
77+
| namespace | | None | Name of the namespace to create the hub instance in. If not specified `aap_ocp_install_namespace` will be used. |
78+
| namespace_manifest_overrides | | None | YAML Manifest to override the generated `Namespace` resource for the hub if the `namespace` key is defined |
79+
| link_text | | Automation Hub (<INSTANCE_NAME>) | Text used for creating the OCP application link |
80+
| hub_manifest_overrides | | None | YAML Manifest to override the generated `AutomationHub` resource |
81+
| consolelink_manifest_overrides | | None | YAML Manifest to override the generated `ConsoleLink` resource |
82+
83+
### aap_ocp_install_eda keys
84+
85+
| Key Name | Required | Default Value | Description |
86+
| instance_name | Yes | None | Name of the EDA instance to create |
87+
| namespace | | None | Name of the namespace to create the EDA instance in. If not specified `aap_ocp_install_namespace` will be used. |
88+
| namespace_manifest_overrides | | None | YAML Manifest to override the generated `Namespace` resource for the EDA if the `namespace` key is defined |
89+
| link_text | | EDA Controller (<INSTANCE_NAME>) | Text used for creating the OCP application link |
90+
| eda_manifest_overrides | | None | YAML Manifest to override the generated `EDA` resource |
91+
| consolelink_manifest_overrides | | None | YAML Manifest to override the generated `ConsoleLink` resource |
92+
93+
## Dependencies
94+
95+
This role depends on the redhat.openshift and kubernetes.core collections.
96+
97+
## Example Playbook
98+
99+
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
100+
101+
```yml
102+
- name: Install AAP on OCP playbook
103+
hosts: localhost
104+
gather_facts: false
105+
106+
vars:
107+
aap_ocp_install_connection:
108+
host: "https://api.crc.testing:6443"
109+
username: kubeadmin
110+
password: <PASSWORD>
111+
validate_certs: false
112+
aap_ocp_install_namespace: aap-test
113+
aap_ocp_install_operator:
114+
channel: "stable-2.2"
115+
aap_ocp_install_controller:
116+
instance_name: automationcontroller
117+
aap_ocp_install_hub:
118+
instance_name: automationhub
119+
aap_ocp_install_eda:
120+
instance_name: edacontroller
121+
122+
roles:
123+
- infra.aap_utilities.aap_ocp_install
124+
...
125+
```
126+
127+
## License
128+
129+
[GPLv3+0](https://github.com/redhat-cop/aap_utilities#licensing)
130+
131+
## Author Information
132+
133+
* Brant Evans
134+
* Derek Waters
135+
* Andrew Block
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
layout: default
3+
title: aap_remove
4+
parent: infra.aap_utilities
5+
---
6+
7+
# infra.aap_utilities.aap_remove
8+
9+
Ansible role to remove instances of AAP.
10+
11+
## Requirements
12+
13+
None
14+
15+
## Role Variables
16+
17+
Available variables are listed below, along with default values defined (see defaults/main.yml)
18+
19+
```yaml
20+
# Role Vars
21+
aap_remove_controller: false
22+
aap_remove_ah: false
23+
```
24+
25+
The above are used to determine whether to remove Controller or Automation Hub from the node.
26+
We recommend setting a host vars or simply using separate plays for each host which determines which of these vars to set true.
27+
An example is below.
28+
29+
## Example Playbook
30+
31+
```yaml
32+
# Playbook to install AAP2
33+
34+
- name: Remove Ansible Controller
35+
hosts: controller
36+
vars:
37+
aap_remove_controller: true
38+
roles:
39+
- infra.aap_utilities.aap_remove
40+
41+
- name: Remove Ansible Automation Hub
42+
hosts: ah
43+
vars:
44+
aap_remove_ah: true
45+
roles:
46+
- infra.aap_utilities.aap_remove
47+
```
48+
49+
## License
50+
51+
[GPLv3+0](https://github.com/redhat-cop/aap_utilities#licensing)
52+
53+
## Author Information
54+
55+
Tom Page
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
layout: default
3+
title: aap_restore
4+
parent: infra.aap_utilities
5+
---
6+
7+
# infra.aap\_utilities.aap\_restore
8+
9+
Ansible role to restore a backup of Ansible Automation Platform.
10+
11+
## Requirements
12+
13+
None
14+
15+
## Role Variables
16+
17+
Available variables are listed below, along with default values defined (see defaults/main.yml)
18+
19+
```yaml
20+
# Role Vars
21+
aap_setup_working_dir: # Must be set, though if the aap_setup_prepare role has been run prior, a fact will be set.
22+
aap_restore_location: "{{ aap_setup_working_dir }}/{{ aap_restore_file }}"
23+
```
24+
25+
## Example Playbook
26+
27+
The following playbook and accompanying vars file containing the defined seed objects can be invoked in the following manner.
28+
29+
```sh
30+
ansible-playbook playbook.yml -e @aap_vars.yml
31+
```
32+
33+
```yaml
34+
- name: Restore AAP
35+
hosts: localhost
36+
become: true
37+
vars:
38+
aap_setup_working_dir: /root/ansible-automation-platform-installer/
39+
aap_restore_location: "{{playbook_dir}}/aap-backup-latest.tar.gz"
40+
roles:
41+
- infra.aap_utilities.aap_restore
42+
```
43+
44+
## License
45+
46+
[GPLv3+0](https://github.com/redhat-cop/aap_utilities#licensing)
47+
48+
## Author Information
49+
50+
Sean Sullivan

0 commit comments

Comments
 (0)