Created
July 22, 2022 12:58
-
-
Save mhalano/e1b3f05e47e428c5739ad87b46a36ddc to your computer and use it in GitHub Desktop.
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
- hosts: localhost | |
vars: | |
namespace: awx | |
service_type: NodePort | |
tasks: | |
- name: Create a k8s namespace | |
kubernetes.core.k8s: | |
name: awx | |
api_version: v1 | |
kind: Namespace | |
state: present | |
- name: Look up release | |
uri: | |
url: "https://api.github.com/repos/ansible/awx-operator/releases/latest" | |
register: release | |
ignore_errors: yes | |
- name: Creating a file with content | |
copy: | |
dest: "./kustomization.yaml" | |
content: | | |
apiVersion: kustomize.config.k8s.io/v1beta1 | |
kind: Kustomization | |
resources: | |
- github.com/ansible/awx-operator/config/default?ref={{ release.json.tag_name }} | |
images: | |
- name: quay.io/ansible/awx-operator | |
newTag: {{ release.json.tag_name }} | |
namespace: awx | |
- name: Create kubernetes resources for lookup output | |
kubernetes.core.k8s: | |
definition: "{{ lookup('kubernetes.core.kustomize', dir='.') }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment