Created
April 17, 2020 14:20
-
-
Save IPvSean/10c751c376356579d859eb052aa7344b to your computer and use it in GitHub Desktop.
automate tower license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl -f -k -H 'Content-Type: application/json' -XPOST -d @tower_license.json --user admin:ansible1234 https://localhost/api/v2/config/