Skip to content

Instantly share code, notes, and snippets.

@IPvSean
Created April 17, 2020 14:20
Show Gist options
  • Save IPvSean/10c751c376356579d859eb052aa7344b to your computer and use it in GitHub Desktop.
Save IPvSean/10c751c376356579d859eb052aa7344b to your computer and use it in GitHub Desktop.
automate tower license
---
- hosts: localcost
connection: local
gather_facts: false
tasks:
- name: Post license key
uri:
url: https://localhost/api/v2/config/
method: POST
user: admin
password: "YOUR_PASSWORD"
body: "{{ lookup('file',playbook_dir+'/tower_license.json') }}"
body_format: json
validate_certs: false
force_basic_auth: true
@IPvSean
Copy link
Author

IPvSean commented Apr 17, 2020

curl -f -k -H 'Content-Type: application/json' -XPOST -d @tower_license.json --user admin:ansible1234 https://localhost/api/v2/config/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment