-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added information, restructured assembly Transfer KCS information to Controller User Guide https://issues.redhat.com/browse/AAP-18440
- Loading branch information
Showing
12 changed files
with
214 additions
and
37 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,17 @@ To sync with the inventory, the credential URL needs to include the `ovirt-engin | |
* *Username*: The username to use to connect to oVirt4. This must include the domain profile to succeed, for example | ||
`[email protected]`. | ||
* *Password*: The password to use to connect to it. | ||
* Optional: *CA File*: Provide an absolute path to the oVirt certificate file (it may end in `.pem`, `.cer` and `.crt` extensions, but preferably `.pem` for consistency) | ||
* Optional: *CA File*: Provide an absolute path to the oVirt certificate file (it may end in `.pem`, `.cer` and `.crt` extensions, but preferably `.pem` for consistency) | ||
|
||
== Access virtualization credentials in an ansible playbook | ||
|
||
You can get the RHV credential parameter from a job runtime environment: | ||
|
||
[literal, options="nowrap" subs="+attributes"] | ||
---- | ||
vars: | ||
ovirt: | ||
ovirt_url: '{{ lookup("env", "OVIRT_URL") }}' | ||
ovirt_username: '{{ lookup("env", "OVIRT_USERNAME") }}' | ||
ovirt_password: '{{ lookup("env", "OVIRT_PASSWORD") }}' | ||
---- |
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
75 changes: 75 additions & 0 deletions
75
downstream/modules/platform/ref-controller-use-credentials-in-playbooks.adoc
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
[id="ref-controller-use-credentials-in-playbooks"] | ||
|
||
= Use {ControllerName} credentials in a playbook | ||
|
||
The following playbook is an example of how to use {ControllerName} credentials in your playbook. | ||
|
||
[literal, options="nowrap" subs="+attributes"] | ||
---- | ||
- hosts: all | ||
vars: | ||
machine: | ||
username: '{{ ansible_user }}' | ||
password: '{{ ansible_password }}' | ||
tower: | ||
host: '{{ lookup("env", "TOWER_HOST") }}' | ||
username: '{{ lookup("env", "TOWER_USERNAME") }}' | ||
password: '{{ lookup("env", "TOWER_PASSWORD") }}' | ||
network: | ||
username: '{{ lookup("env", "ANSIBLE_NET_USERNAME") }}' | ||
password: '{{ lookup("env", "ANSIBLE_NET_PASSWORD") }}' | ||
aws: | ||
access_key: '{{ lookup("env", "AWS_ACCESS_KEY_ID") }}' | ||
secret_key: '{{ lookup("env", "AWS_SECRET_ACCESS_KEY") }}' | ||
security_token: '{{ lookup("env", "AWS_SECURITY_TOKEN") }}' | ||
vmware: | ||
host: '{{ lookup("env", "VMWARE_HOST") }}' | ||
username: '{{ lookup("env", "VMWARE_USER") }}' | ||
password: '{{ lookup("env", "VMWARE_PASSWORD") }}' | ||
gce: | ||
email: '{{ lookup("env", "GCE_EMAIL") }}' | ||
project: '{{ lookup("env", "GCE_PROJECT") }}' | ||
azure: | ||
client_id: '{{ lookup("env", "AZURE_CLIENT_ID") }}' | ||
secret: '{{ lookup("env", "AZURE_SECRET") }}' | ||
tenant: '{{ lookup("env", "AZURE_TENANT") }}' | ||
subscription_id: '{{ lookup("env", "AZURE_SUBSCRIPTION_ID") }}' | ||
tasks: | ||
- debug: | ||
var: machine | ||
- debug: | ||
var: tower | ||
- debug: | ||
var: network | ||
- debug: | ||
var: aws | ||
- debug: | ||
var: vmware | ||
- debug: | ||
var: gce | ||
- shell: 'cat {{ gce.pem_file_path }}' | ||
delegate_to: localhost | ||
- debug: | ||
var: azure | ||
---- | ||
|
||
[discrete] | ||
== Use 'delegate_to' and any lookup variable | ||
|
||
[literal, options="nowrap" subs="+attributes"] | ||
---- | ||
- command: somecommand | ||
environment: | ||
USERNAME: '{{ lookup("env", "USERNAME") }}' | ||
PASSWORD: '{{ lookup("env", "PASSWORD") }}' | ||
delegate_to: somehost | ||
---- |