From e8eef8a1ca7e02e66d7048dc76c06339aa39ac4b Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Mon, 5 Oct 2020 15:23:53 -0400 Subject: [PATCH] Refactor how awx-operator.yaml is rendered out --- ansible/awx-operator.yaml.j2 | 12 ++++++++++++ ansible/chain-operator-files.yml | 11 ++--------- 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 ansible/awx-operator.yaml.j2 diff --git a/ansible/awx-operator.yaml.j2 b/ansible/awx-operator.yaml.j2 new file mode 100644 index 00000000..18ab6893 --- /dev/null +++ b/ansible/awx-operator.yaml.j2 @@ -0,0 +1,12 @@ +#jinja2: trim_blocks:False +# This file is generated by Ansible. Changes will be lost. +# Update templates under ansible/templates/ +{% include 'role.yml.j2' %} + +{% include 'role_binding.yml.j2' %} + +{% include 'service_account.yml.j2' %} + +{% include 'operator.yml.j2' %} + +{% include 'crd.yml.j2' %} diff --git a/ansible/chain-operator-files.yml b/ansible/chain-operator-files.yml index 11b83226..5edf0a4a 100644 --- a/ansible/chain-operator-files.yml +++ b/ansible/chain-operator-files.yml @@ -12,13 +12,6 @@ dest: "{{ playbook_dir }}/../deploy/crds/awx_v1beta1_crd.yaml" - name: Template awx-operator.yaml - copy: - content: | - # This file is generated by Ansible. Changes will be lost. - # Update templates under ansible/templates/ - {{ lookup('template', 'role.yml.j2') }} - {{ lookup('template', 'role_binding.yml.j2') }} - {{ lookup('template', 'service_account.yml.j2') }} - {{ lookup('template', 'operator.yml.j2') }} - {{ lookup('template', 'crd.yml.j2') }} + template: + src: awx-operator.yaml.j2 dest: ../deploy/awx-operator.yaml