Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion guides/common/assembly_using-ansible-roles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

include::modules/con_using-ansible-roles-to-automate-repetitive-tasks-on-clients.adoc[]

include::modules/proc_assigning-ansible-roles-to-an-existing-host.adoc[leveloffset=+1]
include::modules/proc_assigning-ansible-roles-to-a-host.adoc[leveloffset=+1]

include::modules/proc_removing-ansible-roles-from-a-host.adoc[leveloffset=+1]

Expand Down
4 changes: 2 additions & 2 deletions guides/common/modules/con_converting-a-host-to-rhel.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ For more information, see {ContentManagementDocURL}Enabling_Red_Hat_Repositories

.High-level conversion steps
. Import the `{ansible-namespace}.convert2rhel` Ansible role and variables.
For more information, see {ManagingConfigurationsAnsibleDocURL}Importing_Ansible_Roles_and_Variables_ansible[Importing Ansible Roles and Variables] in _{ManagingConfigurationsAnsibleDocTitle}_.
For more information, see {ManagingConfigurationsAnsibleDocURL}Importing_Ansible_Roles_and_Variables_ansible[Importing Ansible roles and variables] in _{ManagingConfigurationsAnsibleDocTitle}_.
. Configure Ansible variables for generation of conversion data.
For more information, see xref:ansible-variables-for-conversion_{context}[].
. Assign the `{ansible-namespace}.convert2rhel` role to the host that represents {ProjectServer}.
For more information, see {ManagingConfigurationsAnsibleDocURL}Assigning_Ansible_Roles_to_an_Existing_Host_ansible[Assigning Ansible Roles to an Existing Host] in _{ManagingConfigurationsAnsibleDocTitle}_.
For more information, see {ManagingConfigurationsAnsibleDocURL}assigning-ansible-roles-to-a-host[Assigning Ansible roles to host] in _{ManagingConfigurationsAnsibleDocTitle}_.
. Run the Ansible role on {ProjectServer}.
For more information, see {ManagingConfigurationsAnsibleDocURL}running-ansible-roles-on-a-host_ansible[Running Ansible Roles on a Host] in _{ManagingConfigurationsAnsibleDocTitle}_.
+
Expand Down
2 changes: 1 addition & 1 deletion guides/common/modules/proc_adding-rhel-system-roles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You can view and make any modifications that you want to the files before you im
. From the list of Ansible roles, select the checkbox of the roles you want to import, and then click *Update*.

You can now assign Ansible roles to hosts or host groups.
For more information, see xref:Assigning_Ansible_Roles_to_an_Existing_Host_{context}[].
For more information, see xref:assigning-ansible-roles-to-a-host[].

You can also add the modules contained in these roles to your Ansible Playbooks by adding them to Ansible Job Templates.
You must include the `hosts:all` line in the job template.
Expand Down
22 changes: 22 additions & 0 deletions guides/common/modules/proc_assigning-ansible-roles-to-a-host.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:_mod-docs-content-type: PROCEDURE

[id="assigning-ansible-roles-to-a-host"]
= Assigning Ansible roles to a host

You can configure hosts registered to {Project} with Ansible roles.

.Prerequisites
* Ensure that you have imported Ansible roles.
For more information, see xref:Importing_Ansible_Roles_and_Variables_{context}[].

.Procedure
. In the {ProjectWebUI}, navigate to *Hosts* > *All Hosts*.
. Select your host.
. On the *Ansible* tab, select the *Roles* tab.
. Click *Assign roles directly to the host*.
. In the *Edit Ansible Roles* window, assign one or more Ansible roles to your host.
. Click *Confirm* to submit your change.

.Next steps
* Run all Ansible roles assigned to your host.
For more information, see xref:running-ansible-roles-on-a-host_{context}[].

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ If the hashes contain the same key, the value is overwritten by the value of the
. Optional: Expand the *Specify Matchers* area and specify criteria for selecting hosts on which the variable overrides.
. To save the override settings, click *Submit*.

To use the Ansible variable, add the variable as a parameter to your host or host group, or add the variable as a global parameter.
Alternatively, if you only want to override the value of a variable of a single host, you can change the variable on the *Ansible* tab on the host details page.

.Adding the variable to a host
. In the {ProjectWebUI}, navigate to *Hosts > All Hosts* and select the host that you want to use.
. Click the *Ansible* tab, and in the *Variables* area, click the pencil icon to edit the value of the variable.
.Overriding variables for individual hosts
. In the {ProjectWebUI}, navigate to *Hosts* > *All Hosts*.
. Select your host.
. On the *Ansible* tab, select the *Variables* tab.
. Click the pencil icon to edit the value of the variable.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: This way of overriding a variable is an alternative way to create a matcher (described in this file in the lines before the diff). While we are at it, maybe we could make this clear? Otherwise people might be confused as to how these two features interact (e.g., if I create a matcher AND set the variable via the host's ansible variables tab, which one has precedence)

. Click the tick icon to accept the value of the changed variable or the cross icon to cancel the change.

.Adding the variable to a host group
Expand Down
Loading