mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-07 22:02:53 +00:00
Automate some build and release related activities
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
---
|
||||
# To run: `ansible-playbook chain-operator-files.yml`
|
||||
- name: Chain operator files together for easy deployment.
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
|
||||
vars:
|
||||
operator_image: ansible/awx-operator:0.5.0
|
||||
pull_policy: Always
|
||||
operator_file_path: "../deploy/awx-operator.yaml"
|
||||
operator_template: "../deploy/operator.yaml"
|
||||
|
||||
tasks:
|
||||
- name: Clear out current contents of awx-operator.yml
|
||||
copy:
|
||||
dest: "{{ operator_file_path }}"
|
||||
content: ''
|
||||
force: true
|
||||
|
||||
- name: Concatenate operator files into awx-operator.yml
|
||||
blockinfile:
|
||||
path: "{{ operator_file_path }}"
|
||||
block: "{{ item }}"
|
||||
marker: ""
|
||||
marker_begin: ""
|
||||
marker_end: ""
|
||||
insertafter: "EOF"
|
||||
with_file:
|
||||
- "../deploy/role.yaml"
|
||||
- "../deploy/role_binding.yaml"
|
||||
- "../deploy/service_account.yaml"
|
||||
- "../deploy/operator.yaml"
|
||||
- "../deploy/crds/awx_v1beta1_crd.yaml"
|
||||
|
||||
- name: Remove space at beginning of awx-operator.yml
|
||||
shell: >
|
||||
echo "$(tail -n +2 {{ operator_file_path }})" > {{ operator_file_path }}
|
||||
changed_when: true
|
||||
|
||||
- name: Template the awx-operator.yaml file into awx-operator.yml
|
||||
template:
|
||||
src: "{{ operator_file_path }}"
|
||||
dest: "{{ operator_file_path }}"
|
||||
Reference in New Issue
Block a user