Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible Provisioning Callback error #3807

Closed
ghost opened this issue May 2, 2019 · 2 comments
Closed

Ansible Provisioning Callback error #3807

ghost opened this issue May 2, 2019 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented May 2, 2019

ISSUE TYPE
  • Bug Report
SUMMARY

AWX provisioning callback not functioning correctly. When I try to use the AWX provisioning callback I get an error of “{"detail":"You do not have permission to perform this action."}

ENVIRONMENT
  • AWX version: 4.0.0
  • AWX install method: docker on linux,
  • Ansible version: 2.7.9
  • Operating System: CentOS Linux release 7.6.1810 (Core)
  • Web Browser: Firefox 60.6.1esr (64-bit)
STEPS TO REPRODUCE

In my Foreman Build I added the necessary Host Parameters to allow the AWX provisioning callback (listed bellow). Once I noticed it failed I pulled the curl command (listed bellow) and got the following error “{"detail":"You do not have permission to perform this action."}”

ansible_tower_provisioning: true
ansible_tower_fqdn: “IP of My AWX Server”
ansible_job_template_id: 12
ansible_host_config_key: cb72a806-cd82-487a-86ce-14b8015b2c02

/usr/bin/curl -k -s http://$SERVIERIP$/api/v2/job_templates/12/callback/ --data cb72a806-cd82-487a-86ce-14b8015b2c02

EXPECTED RESULTS

When I run the curl command I am hoping that on the AWX jobs page I should see that the job template has started and is running a playbook ageist my newly built server.

ACTUAL RESULTS

When I run the curl command I receive permission error: {"detail":"You do not have permission to perform this action."}

ADDITIONAL INFORMATION

sosreport-tower-2019-05-02-lgvfmpq.tar.gz

@merou
Copy link

merou commented Jul 17, 2019

Please try:

$ curl -v -k -s -i -X POST -H 'Content-Type:application/json' \
          --data '{"host_config_key": "xxx-xxxx-xxxx-xxxx"}' \
          http://localhost/api/v2/job_templates/8/callback/

Example can be found here (awx_web container):
/usr/share/awx/request_tower_configuration.sh

@matburt
Copy link
Member

matburt commented Jul 23, 2019

Looks like just incorrect usage of the provisioning callback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants