diff options
Diffstat (limited to 'ansible_collections/netapp/cloudmanager/execution_environments')
6 files changed, 86 insertions, 0 deletions
diff --git a/ansible_collections/netapp/cloudmanager/execution_environments/README.md b/ansible_collections/netapp/cloudmanager/execution_environments/README.md new file mode 100644 index 000000000..fda73b90f --- /dev/null +++ b/ansible_collections/netapp/cloudmanager/execution_environments/README.md @@ -0,0 +1,34 @@ +# How to build an Ansible Execution Environment + +## Prerequisites +This was tested with ansible-builder version 1.1.0. + +## Building from Galaxy +Using the files in the ansible_collections/netapp/cloudmanager/execution_environments/from_galaxy directory as a template: +- execution-environment.yml describes the build environment. +- requirements.yml defines the collections to add into you execution environment. + +Then build with: + +``` +ansible-builder build +``` + +For instance, using podman instead of docker, and tagging: +``` +ansible-builder build --container-runtime=podman --tag myregistry.io/ansible-ee-netapp-cm:21.20.1 -f execution-environment.yml -v 3 +``` + +In my case, I needed to use sudo. + +## Building from GitHub +Alternativaly, the source code can be downloaded from GitHub. It allows to get code before release (at your own risks) or to use a fork. +See ansible_collections/netapp/cloudmanager/execution_environments/from_github/requirements.yml + +## References + +https://ansible-builder.readthedocs.io/en/stable/usage/ + +https://docs.ansible.com/automation-controller/latest/html/userguide/ee_reference.html + + diff --git a/ansible_collections/netapp/cloudmanager/execution_environments/from_galaxy/execution-environment.yml b/ansible_collections/netapp/cloudmanager/execution_environments/from_galaxy/execution-environment.yml new file mode 100644 index 000000000..466fb8373 --- /dev/null +++ b/ansible_collections/netapp/cloudmanager/execution_environments/from_galaxy/execution-environment.yml @@ -0,0 +1,10 @@ +--- +version: 1 + +# ansible_config: 'ansible.cfg' + +# build_arg_defaults: +# EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner:latest' + +dependencies: + galaxy: requirements.yml diff --git a/ansible_collections/netapp/cloudmanager/execution_environments/from_galaxy/requirements.yml b/ansible_collections/netapp/cloudmanager/execution_environments/from_galaxy/requirements.yml new file mode 100644 index 000000000..b19e33b49 --- /dev/null +++ b/ansible_collections/netapp/cloudmanager/execution_environments/from_galaxy/requirements.yml @@ -0,0 +1,13 @@ +--- +collections: + # Install collections from Galaxy + # - name: ansible.posix + # - name: netapp.aws + # # name: - netapp.azure + - name: netapp.cloudmanager + version: 21.20.1 + # - name: netapp.elementsw + # - name: netapp.ontap + # version: 21.24.1 + # - name: netapp.storagegrid + # - name: netapp.um_info diff --git a/ansible_collections/netapp/cloudmanager/execution_environments/from_github/execution-environment.yml b/ansible_collections/netapp/cloudmanager/execution_environments/from_github/execution-environment.yml new file mode 100644 index 000000000..466fb8373 --- /dev/null +++ b/ansible_collections/netapp/cloudmanager/execution_environments/from_github/execution-environment.yml @@ -0,0 +1,10 @@ +--- +version: 1 + +# ansible_config: 'ansible.cfg' + +# build_arg_defaults: +# EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner:latest' + +dependencies: + galaxy: requirements.yml diff --git a/ansible_collections/netapp/cloudmanager/execution_environments/from_github/requirements.yml b/ansible_collections/netapp/cloudmanager/execution_environments/from_github/requirements.yml new file mode 100644 index 000000000..efea39c22 --- /dev/null +++ b/ansible_collections/netapp/cloudmanager/execution_environments/from_github/requirements.yml @@ -0,0 +1,18 @@ +--- +collections: + # Install collections from Galaxy + # - name: ansible.posix + # - name: netapp.aws + # # name: - netapp.azure + # - name: netapp.cloudmanager + # version: 21.20.1 + # - name: netapp.elementsw + # - name: netapp.ontap + # version: 21.24.1 + # - name: netapp.storagegrid + # - name: netapp.um_info + + # Install a collection from GitHub. + - source: https://github.com/ansible-collections/netapp.cloudmanager.git + type: git + version: test_ee_21_20_0 diff --git a/ansible_collections/netapp/cloudmanager/execution_environments/requirements.txt b/ansible_collections/netapp/cloudmanager/execution_environments/requirements.txt new file mode 100644 index 000000000..02dd40520 --- /dev/null +++ b/ansible_collections/netapp/cloudmanager/execution_environments/requirements.txt @@ -0,0 +1 @@ +ansible-builder |