Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Deploy of AWX (Ansible Tower) on OpenShift
mkdir Tower
cd Tower/
git clone https://github.com/ansible/awx.git
cd awx
cd installer/
#vi inventory
-# openshift_host=127.0.0.1:8443
-# awx_openshift_project=awx
-# openshift_user=developer
-# awx_node_port=30083
+ openshift_host=127.0.0.1:8443
+ awx_openshift_project=awx
+ openshift_user=developer
+ awx_node_port=30001
+# valid host port range 30000-32767
+ openshift_password=developer
# Standalone Docker Install
-postgres_data_dir=/tmp/pgdocker
-host_port=80
+#postgres_data_dir=/tmp/pgdocker
+#host_port=80
# Define if you want the image pushed to a registry. The container definition will also use these images
-# docker_registry=172.30.1.1:5000
-# docker_registry_repository=awx
-# docker_registry_username=developer
+ docker_registry=172.30.1.1:5000
+ docker_registry_repository=awx
+ docker_registry_username=developer
ansible-playbook -i inventory install.yml
#get the name of the AWX replica set
export RS_AWX = oc get rs|awk 'FNR>1 {print $1}'
oc scale --replicas=0 rs $RS_AWX
#add volume to the replicaset that will be mounted to awx-celery
oc patch rs $RS_AWX -p '{"spec":{"template":{"spec":{"volumes":[{"name":"awxprojectsdata","persistentVolumeClaim":{"claimName":"claim-awx"}}]}}}}'
#mount the volume to awx-celery
oc patch rs $RS_AWX -p '{"spec":{"template":{"spec":{"containers":[{"name":"awx-celery","volumeMounts":[{"mountPath":"/var/lib/awx/projects/","name":"awxprojectsdata"}]}]}}}}'
oc scale --replicas=1 rs $RS_AWX
@jherreraBE

This comment has been minimized.

Copy link

commented Dec 21, 2017

Hi,
I try to install awx on our openshift enviroment but when I try to run the install.yml it give this error:
7514756@s51lv06:~/awx/installer $ ansible-playbook -i inventory install.yml
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in '/home/7514756/awx/installer/check_vars/tasks/main.yml': line 4, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  • include_tasks: check_openshift.yml
    ^ here

The error appears to have been in '/home/7514756/awx/installer/check_vars/tasks/main.yml': line 4, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  • include_tasks: check_openshift.yml
    ^ here
@veve90

This comment has been minimized.

Copy link

commented Jan 12, 2018

I have the same error...

@patmaloney

This comment has been minimized.

Copy link

commented Mar 13, 2018

I ran into this error, & checking my ansible version saw I was running v2.3.x, & the requirements specified +v2.4.

Once I updated the ansible version, the issue was resolved. Looking further, the include_tasks functionality changes with 2.4; hence the errors

@ryannix123

This comment has been minimized.

Copy link

commented Jul 3, 2018

What variable would I pass if I'm using an actual cluster with oAuth as the backend?

i.e., openshift_user=myOpenShiftToken?

@ryannix123

This comment has been minimized.

Copy link

commented Jul 3, 2018

TASK [kubernetes : OpenShift authentication failed on TLS verification] ******************************************************************
fatal: [localhost]: FAILED! => {"msg": "The conditional check 'openshift_auth_result.rc != 0' failed. The error was: error while evaluating conditional (openshift_auth_result.rc != 0): 'dict object' has no attribute 'rc'\n\nThe error appears to have been in '/Users/rtn361/Desktop/awx/installer/roles/kubernetes/tasks/openshift.yml': line 30, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: OpenShift authentication failed on TLS verification\n ^ here\n"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.