Skip to content

Commit

Permalink
Merge pull request #4 from madorn/md-ee
Browse files Browse the repository at this point in the history
add execution environment file for ansible-builder
  • Loading branch information
exe-prow-github-app[bot] authored Jul 13, 2023
2 parents 0b56f9a + 54c5292 commit 5f66cf9
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
38 changes: 35 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Contains Ansible playbooks for installing operators and checking status of the install.

## Usage

### Setup
Set the following env vars:

```
Expand All @@ -14,8 +16,38 @@ or if you prefer set:
K8S_AUTH_KUBECONFIG=<path to your kubeconfig file>
```

Copy var.yaml.example to vars.yaml and modify accordingly. If packages is empty, it will pull ALL packages
from the catalog source.
Copy `var.yaml.example` to `vars.yaml` and modify accordingly. If `packages` value is empty, it will pull ALL packages from the catalog source.

### Run playbooks with Ansible Navigator

The fastest way to get started is to run the playbooks via `ansible-navigator` with an Ansible execution environment container image:

```
ansible-navigator run audits.yaml --container-engine podman --eei quay.io/opdev/opcap-ansible-ee:latest -e @vars.yaml --penv K8S_AUTH_VERIFY_SSL --penv K8S_AUTH_API_KEY --penv K8S_AUTH_HOST -m stdout
````
or if you prefer to provide a kubeconfig:
```
ansible-navigator run audits.yaml --container-engine podman --eei quay.io/opdev/opcap-ansible-ee:latest -e @vars.yaml --senv K8S_AUTH_KUBECONFIG=/dir/kubeconfig --eev /dir:/dir -m stdout
```
### Run playbooks with Ansible Playbook
You may prefer to run playbooks via `ansible-playbook` although this method requires proper dependencies installed on localhost:
```
ansible-playbook -e @vars.yaml audits.yaml
```
### Misc
Build your own execution environment image with `ansible-builder`:
```
ansible-builder build --container-runtime=podman --tag=opcap-ansible-ee --prune-images --verbosity 3
```
`ansible-playbook -e @vars.yaml audits.yaml`
12 changes: 12 additions & 0 deletions execution-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
version: 3

build_arg_defaults:
ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: '--force --verbose'

dependencies:
ansible_core:
package_pip: ansible-core==2.13.10
ansible_runner:
package_pip: ansible-runner==2.3.2
galaxy: requirements.yml
3 changes: 3 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
collections:
- name: kubernetes.core

0 comments on commit 5f66cf9

Please sign in to comment.