Update tests and lint concerns

This commit is contained in:
Matthew Jones
2020-08-17 15:57:43 -04:00
parent edc60300be
commit 23ddaddbe8
11 changed files with 17 additions and 18 deletions

View File

@@ -3,7 +3,7 @@ FROM ${BASEIMAGE}
USER 0
RUN yum install -y python-devel gcc libffi-devel
RUN pip install molecule==2.20.1
RUN pip install molecule==2.20.1 jmespath
ARG NAMESPACEDMAN
ADD $NAMESPACEDMAN /namespaced.yaml

View File

@@ -16,8 +16,8 @@ spec:
tower_admin_email: test@example.com
tower_admin_password: changeme
tower_task_image: ansible/awx:13.0.0
tower_web_image: ansible/awx:13.0.0
tower_task_image: ansible/awx:14.0.0
tower_web_image: ansible/awx:14.0.0
tower_task_mem_request: 1Gi
tower_task_cpu_request: 500m

View File

@@ -38,7 +38,7 @@ spec:
The secret should have the name: <custom resource name>-postgres-configuration and
should look like:
apiVersion: v1
kind: Secret
metadata:

View File

@@ -16,8 +16,8 @@ spec:
tower_admin_email: test@example.com
tower_admin_password: changeme
tower_task_image: ansible/awx:13.0.0
tower_web_image: ansible/awx:13.0.0
tower_task_image: ansible/awx:14.0.0
tower_web_image: ansible/awx:14.0.0
tower_task_mem_request: 128M
tower_task_cpu_request: 500m

View File

@@ -6,6 +6,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: awx-operator
namespace: default
roleRef:
kind: ClusterRole
name: awx-operator

View File

@@ -10,7 +10,7 @@
tasks:
- name: Create Custom Resource Definition
k8s:
definition: "{{ lookup('file', '/'.join([deploy_dir, 'crds/tower_v1beta1_tower_crd.yaml'])) }}"
definition: "{{ lookup('file', '/'.join([deploy_dir, 'crds/awx_v1beta1_crd.yaml'])) }}"
- name: Ensure specified namespace is present
k8s:

View File

@@ -26,7 +26,7 @@
deploy_dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/deploy"
pull_policy: Never
operator_image: awx.ansible.com/awx-operator:testing
custom_resource: "{{ lookup('file', '/'.join([deploy_dir, 'crds/tower_v1beta1_tower_cr_molecule.yaml'])) | from_yaml }}"
custom_resource: "{{ lookup('file', '/'.join([deploy_dir, 'crds/awx_v1beta1_molecule.yaml'])) | from_yaml }}"
tasks:

View File

@@ -35,7 +35,7 @@
pull_policy: Never
operator_image: awx.ansible.com/awx-operator:testing
# Change this to _awx to test AWX, _tower to test Tower.
custom_resource: "{{ lookup('file', '/'.join([deploy_dir, 'crds/tower_v1beta1_tower_cr_awx.yaml'])) | from_yaml }}"
custom_resource: "{{ lookup('file', '/'.join([deploy_dir, 'crds/awx_v1beta1_molecule.yaml'])) | from_yaml }}"
tasks:
- block:

View File

@@ -11,12 +11,12 @@ tower_admin_password: changeme
tower_broadcast_websocket_secret: changeme
# Use these image versions for Ansible Tower.
#tower_task_image: registry.redhat.io/ansible-tower-37/ansible-tower-rhel7:3.7.0
#tower_web_image: registry.redhat.io/ansible-tower-37/ansible-tower-rhel7:3.7.0
# tower_task_image: registry.redhat.io/ansible-tower-37/ansible-tower-rhel7:3.7.0
# tower_web_image: registry.redhat.io/ansible-tower-37/ansible-tower-rhel7:3.7.0
# Use these image versions for Ansible AWX.
tower_task_image: ansible/awx:13.0.0
tower_web_image: ansible/awx:13.0.0
tower_task_image: ansible/awx:14.0.0
tower_web_image: ansible/awx:14.0.0
tower_create_preload_data: true

View File

@@ -13,7 +13,7 @@
k8s_info:
kind: Secret
namespace: '{{ meta.namespace }}'
name: '{{meta.name }}-postgres-configuration'
name: '{{ meta.name }}-postgres-configuration'
register: postgres_config_resources
- name: Create Database configuration if it doesn't already exist
@@ -51,7 +51,6 @@
definition: "{{ lookup('template', 'tower_secret.yaml.j2') }}"
register: k8s_tower_secret_result
when: secret_key_resources['resources'] | length < 1
- name: Ensure configured AWX resources exist in the cluster.
k8s:

View File

@@ -1,5 +1,4 @@
---
- name: Check for existing secret key
k8s_info:
kind: Secret
@@ -11,7 +10,7 @@
k8s_info:
kind: Secret
namespace: '{{ meta.namespace }}'
name: '{{meta.name }}-postgres-configuration'
name: '{{ meta.name }}-postgres-configuration'
register: postgres_config_resources
- name: Remove ownerReferences from PG configuration if it exists