-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Added new OpenShift Virtualization inventory source to docs. #15299
Changes from 1 commit
474731a
de60696
0f77fbc
b7e24c0
808d6da
b77a5e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.. _ug_inventories: | ||
.. _ug_inventories: | ||
|
||
******************* | ||
Inventories | ||
|
@@ -481,7 +481,7 @@ Inventory updates use dynamically-generated YAML files which are parsed by their | |
- :ref:`ug_source_openstack` | ||
- :ref:`ug_source_rhv` | ||
- :ref:`ug_source_rhaap` | ||
- :ref:`ug_source_terraform` | ||
- :ref:`ug_source_ocpv` | ||
|
||
|
||
Newly created configurations for inventory sources will contain the default plugin configuration values. If you want your newly created inventory sources to match the output of legacy sources, you must apply a specific set of configuration values for that source. To ensure backward compatibility, AWX uses "templates" for each of these sources to force the output of inventory plugins into the legacy format. Refer to :ref:`ir_inv_plugin_templates_reference` section of this guide for each source and their respective templates to help you migrate to the new style inventory plugin output. | ||
|
@@ -1100,7 +1100,7 @@ This inventory source uses the `terraform_state <https://github.com/ansible-coll | |
|
||
1. To configure this type of sourced inventory, select **Terraform State** from the Source field. | ||
|
||
2. The Create new source window expands with the required **Credential** field. Choose from an existing Terraform backend Credential. For more information, refer to :ref:`ug_credentials`. | ||
2. The Create new source window expands with the required **Credential** field. Choose from an existing Terraform backend credential. For more information, refer to :ref:`ug_credentials_terraform`. | ||
|
||
3. You can optionally specify the verbosity, host filter, enabled variable/value, and update options as described in the main procedure for :ref:`adding a source <ug_add_inv_common_fields>`. For Terraform, enable **Overwrite** and **Update on launch** options. | ||
|
||
|
@@ -1120,6 +1120,46 @@ This inventory source uses the `terraform_state <https://github.com/ansible-coll | |
6. To add hosts for AWS EC2, GCE, and Azure instances, the Terraform state file in the backend must contain state for resources already deployed to EC2, GCE, or Azure. Refer to each of the Terraform providers' respective documentation to provision instances. | ||
|
||
|
||
.. _ug_source_ocpv: | ||
|
||
|
||
OpenShift Virtualization | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. index:: | ||
pair: inventories; OpenShift | ||
pair: inventories; OCP | ||
pair: inventory source; OpenShift virtualization | ||
|
||
|
||
This inventory source uses a cluster that is able to deploy OpenShift (OCP) virtualization. In order to configure an OCP virtualization requires a virtual machine deployed in a specific namespace and an OpenShift or Kubernetes API Bearer Token credential. | ||
|
||
1. To configure this type of sourced inventory, select **OpenShift Virtualization** from the Source field. | ||
2. The Create new source window expands with the required **Credential** field. Choose from an existing Kubernetes API Bearer Token credential. For more information, refer to :ref:`ug_credentials_ocp_k8s`. In this example, the ``cmv2.engineering.redhat.com`` credential is used. | ||
|
||
3. You can optionally specify the verbosity, host filter, enabled variable/value, and update options as described in the main procedure for :ref:`adding a source <ug_add_inv_common_fields>`. | ||
|
||
4. Use the **Source Variables** field to override variables used by the ``controller`` inventory plugin. Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two. For more information on these variables, see the `Kubernetes (K8s) inventory source <https://github.com/ansible-collections/kubernetes.core/blob/main/docs/kubernetes.core.k8s_inventory.rst>`_ documentation for detail. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/ansible-collections/community.kubevirt There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
In the example below, the ``connections`` variable is used to specify access to a particular namespace in a cluster. | ||
|
||
:: | ||
|
||
--- | ||
connections: | ||
- namespaces: | ||
- hao-test | ||
|
||
|
||
.. image:: ../common/images/inventories-create-source-ocpvirt-example.png | ||
|
||
5. Save the configuration and click the **Sync** button to sync the inventory. | ||
TheRealHaoLiu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
As the sync runs, the results display in the job run output window. To access the job output while it is running, you can click on the spinning "Running" icon next to the **Last Job Status** field. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this paragraph and the image below is necessary to include. This statement is not specific to this credential and would be the case for all the other inventory updates too. |
||
.. image:: ../common/images/inventories-create-source-ocpvirt-job-sync.png | ||
|
||
|
||
.. _ug_customscripts: | ||
|
||
Export old inventory scripts | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I must have accidentally typed over it instead of copying an entry for the new one.