mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
29 lines
783 B
YAML
29 lines
783 B
YAML
---
|
|
- name: Prepare operator resources
|
|
hosts: localhost
|
|
connection: local
|
|
|
|
vars:
|
|
ansible_python_interpreter: '{{ ansible_playbook_python }}'
|
|
deploy_dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/deploy"
|
|
|
|
tasks:
|
|
- name: Create Custom Resource Definition
|
|
k8s:
|
|
definition: "{{ lookup('file', '/'.join([deploy_dir, 'crds/tower_v1alpha1_tower_crd.yaml'])) }}"
|
|
|
|
- name: Ensure specified namespace is present
|
|
k8s:
|
|
api_version: v1
|
|
kind: Namespace
|
|
name: '{{ operator_namespace }}'
|
|
|
|
- name: Create RBAC resources
|
|
k8s:
|
|
definition: "{{ lookup('template', '/'.join([deploy_dir, item])) }}"
|
|
namespace: '{{ operator_namespace }}'
|
|
with_items:
|
|
- role.yaml
|
|
- role_binding.yaml
|
|
- service_account.yaml
|