I am trying to follow the instructions for setting up pipline to Ansible tower as documented at https://bitbucket.org/AnsibleByRedHat/ansible-tower-pipelines/src/master/
When I commit the pipeling launches the bitbucket-pipelines.yml and successfully loaded the "pip install ansible-tower-cli"
However the next step failed with the error
<span><a href="https://bitbucket.org/IanW-nz/kasp-playground/src/68f6251f5ce2a4dbcf14c71a76158b7744197d84/tower.bash" target="_blank" rel="noopener noreferrer">./tower.bash</a> </span><span>bash: ./tower.bash: Permission denied</span>
<span>I seams to me that the pipline execution is not able to access the tower.bash file. </span>
<span>If I delete tower.bash the error changes to file not found. I change the batch call to an ssh command and that did executed. is there some file </span>permission setting in the repository or a sudo command in the YAML that I need to tweak some how?
bitbucket-pipelines.yml
# This is a sample build configuration for the Ansible Tower integration.
# Do not use tabs to indent.
# You can specify a custom docker image from Dockerhub
# for your build environment.
image: python:2.7
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- pip install ansible-tower-cli
- ./tower.bash
tower.bash
#!/bin/bash -ex
echo "Configuring Tower Settings"
hostval=$(tower-cli config host $host)
userval=$(tower-cli config username $username)
passwordval=$(tower-cli config password $password)
if [[ $userval == "username: " ]] || [[ $passwordval == "password: " ]]
then
echo "WARNING: Configuration has not been fully set";
echo " You will want to run the $ tower-cli config ";
echo " command for host, username, and password ";
fi
echo " current configuration settings:"
echo $hostval
echo $userval
echo $passwordval
tower-cli "config verify_ssl false"
# Let's run a tower-cli job
tower-cli job launch --job-template $ID --monitor