diff --git a/guides/common/assembly_administering-hosts.adoc b/guides/common/assembly_administering-hosts.adoc index 50842e34555..d2192be39b8 100644 --- a/guides/common/assembly_administering-hosts.adoc +++ b/guides/common/assembly_administering-hosts.adoc @@ -16,14 +16,6 @@ include::modules/proc_changing-the-module-stream-for-a-host.adoc[leveloffset=+1] include::modules/proc_enabling-custom-repositories-on-content-hosts.adoc[leveloffset=+1] -include::modules/proc_creating-a-host-group.adoc[leveloffset=+1] - -include::modules/proc_creating-a-host-group-for-each-lifecycle-environment.adoc[leveloffset=+1] - -include::modules/proc_adding-a-host-to-a-host-group.adoc[leveloffset=+1] - -include::modules/proc_changing-the-host-group-of-a-host.adoc[leveloffset=+1] - ifdef::katello,satellite,orcharhino[] include::modules/proc_adding-a-host-to-a-host-collection.adoc[leveloffset=+1] diff --git a/guides/common/assembly_working-with-host-groups.adoc b/guides/common/assembly_working-with-host-groups.adoc new file mode 100644 index 00000000000..aa9a5824c15 --- /dev/null +++ b/guides/common/assembly_working-with-host-groups.adoc @@ -0,0 +1,11 @@ +include::modules/con_working-with-host-groups.adoc[] + +include::modules/con_host-group-settings-and-nested-host-groups.adoc[leveloffset=+1] + +include::modules/proc_creating-a-host-group.adoc[leveloffset=+1] + +include::modules/proc_creating-a-host-group-for-each-lifecycle-environment.adoc[leveloffset=+1] + +include::modules/proc_adding-a-host-to-a-host-group.adoc[leveloffset=+1] + +include::modules/proc_changing-the-host-group-of-a-host.adoc[leveloffset=+1] diff --git a/guides/common/modules/con_host-group-settings-and-nested-host-groups.adoc b/guides/common/modules/con_host-group-settings-and-nested-host-groups.adoc new file mode 100644 index 00000000000..bc04030fd49 --- /dev/null +++ b/guides/common/modules/con_host-group-settings-and-nested-host-groups.adoc @@ -0,0 +1,133 @@ +[id="Host_Group_Settings_and_Nested_Host_Groups_{context}"] += Host Group Settings and Nested Host Groups + +A host group can define many settings for hosts, such as Lifecycle Environment, Content View, or Ansible roles that are available to the hosts. + +IMPORTANT: When you change the settings of an existing host group, the new settings do not propagate to the hosts assigned to the host group. +Only Puppet class settings get updated on hosts after you change them in the host group. + +You can create a hierarchy of host groups. +Aim to have one base level host group that represents all hosts in your organization and provides general settings, and then nested groups that provide specific settings. + +{Project} applies host settings in the following order when nesting host groups: + +* Host settings take priority over host group settings. +* Nested host group settings take priority over parent host group settings. + +.Nested Host Group Hierarchy +==== +You create a top-level host group named *Base* and two nested host groups named *Webserver* and *Storage*. +The nested host groups are associated with multiple hosts. +You also create host `custom.example.com` that is not associated with any host group. + +You define the operating system on the top-level host group (*Base*) and Ansible roles on the nested host groups (*Webservers* and *Storage*). + +[cols="1,1,1,2"] +|=== +|Top-level host group |Nested host group |Hosts |Settings inherited from host groups + +.4+|*Base* + +This host group applies the `{EL}{nbsp}8.8` operating system setting. + +// Rows related to Webservers +.2+|*Webservers* + +This host group applies the `linux-system-roles.selinux` Ansible role. + +|*webserver1.example.com* + +.2+a|Hosts use the following settings: + +* `{EL}{nbsp}8.8` defined by host group *Base* +* `linux-system-roles.selinux` defined by host group *Webservers* + +|*webserver2.example.com* + +// Rows related to Storage +.2+|*Storage* + +This host group applies the `linux-system-roles.postfix` Ansible role. + +|*storage1.example.com* + +.2+a|Hosts use the following settings: + +* `{EL}{nbsp}8.8` defined by host group *Base* +* `linux-system-roles.postfix` defined by host group *Storage* + +|*storage2.example.com* + +// Row related to No host group +2+|[No host group] + +|*custom.example.com* + +|No settings inherited from host groups. + +|=== +==== + +.Nested Host Group Settings +==== +You create a top-level host group named *Base* and two nested host groups named *Webserver* and *Storage*. +You also create host `custom.example.com` that is associated with the top-level host group *Base*, but no nested host group. + +You define different values for the operating system and Ansible role settings on the top-level host group (*Base*) and nested host groups (*Webserver* and *Storage*). + +[cols="1,1,1,2"] +|=== +|Top-level host group |Nested host group |Host |Settings inherited from host groups + +.5+a|*Base* + +This host group applies these settings: + +* The `{EL}{nbsp}8.8` operating system +* The `linux-system-roles.selinux` Ansible role + +// Rows related to Webservers +.2+a|*Webservers* + +This host group applies these settings: + +* The `{EL}{nbsp}8.9` operating system +* No Ansible role + +|*webserver1.example.com* + +.2+a|Hosts use the following settings: + +* The `{EL}{nbsp}8.9` operating system from host group *Webservers* +* The `linux-system-roles.selinux` Ansible role from host group *Base* + +|*webserver2.example.com* + +// Rows related to Storage +.2+a|*Storage* + +This host group applies these settings: + +* No operating system +* The `linux-system-roles.postfix` Ansible role + +|*storage1.example.com* + +.2+a|Hosts use the following settings: + +* The `{EL}{nbsp}8.8` operating system from host group *Base* +* The `linux-system-roles.postfix` Ansible role from host group *Storage* + +|*storage2.example.com* + +// Row related to custom.example.com +|[No nested host group] +|*custom.example.com* +a|Host uses the following settings: + +* The `{EL}{nbsp}8.8` operating system from host group *Base* +* The `linux-system-roles.selinux` Ansible role from host group *Base* + +|=== +==== + diff --git a/guides/common/modules/con_working-with-host-groups.adoc b/guides/common/modules/con_working-with-host-groups.adoc new file mode 100644 index 00000000000..5a932bbeee3 --- /dev/null +++ b/guides/common/modules/con_working-with-host-groups.adoc @@ -0,0 +1,6 @@ +[id="Working_with_Host_Groups_{context}"] += Working with Host Groups + +A host group acts as a template for common host settings. +Instead of defining the settings individually for each host, use host groups to define common settings once and apply them to multiple hosts. + diff --git a/guides/common/modules/proc_creating-a-host-group.adoc b/guides/common/modules/proc_creating-a-host-group.adoc index 00ed43cd9d0..7e02d89123f 100644 --- a/guides/common/modules/proc_creating-a-host-group.adoc +++ b/guides/common/modules/proc_creating-a-host-group.adoc @@ -1,35 +1,10 @@ [id="Creating_a_Host_Group_{context}"] = Creating a Host Group -If you create a high volume of hosts, many of the hosts can have common settings and attributes. -Adding these settings and attributes for every new host is time consuming. -If you use host groups, you can apply common attributes to hosts that you create. - -A host group functions as a template for common host settings, containing many of the same details that you provide to hosts. -When you create a host with a host group, the host inherits the defined settings from the host group. -You can then provide additional details to individualize the host. +Create a host group to be able to apply host settings to multiple hosts. To use the CLI instead of the {ProjectWebUI}, see the xref:cli-creating-a-host-group_{context}[]. -.Host Group Hierarchy -You can create a hierarchy of host groups. -Aim to have one base level host group that represents all hosts in your organization and provide general settings, and then nested groups to provide specific settings. -For example, you can have a base level host group that defines the operating system, and two nested host groups that inherit the base level host group: - -* *Hostgroup:* `Base` ({EL} 8.8) -** *Hostgroup:* `Webserver` (applies the `nginx` Puppet class) -*** *Host:* `webserver1.example.com` (web server) -*** *Host:* `webserver2.example.com` (web server) -** *Hostgroup:* `Storage` (applies the `nfs` Puppet class) -*** *Host:* `storage1.example.com` (storage server) -*** *Host:* `storage2.example.com` (storage server) -** *Host:* `custom.example.com` (custom host) - -In this example, all hosts use {RHEL} 7.6 as their operating system because of their inheritance of the `Base` host group. -The two web server hosts inherit the settings from the `Webserver` host group, which includes the `nginx` Puppet class and the settings from the `Base` host group. -The two storage servers inherit the settings from the `Storage` host group, which includes the `nfs` Puppet class and the settings from the `Base` host group. -The custom host only inherits the settings from the `Base` host group. - .Procedure . In the {ProjectWebUI}, navigate to *Configure* > *Host Groups* and click *Create Host Group*. . If you have an existing host group that you want to inherit attributes from, you can select a host group from the *Parent* list. diff --git a/guides/doc-Managing_Hosts/master.adoc b/guides/doc-Managing_Hosts/master.adoc index 912726c4a76..6288738a1af 100644 --- a/guides/doc-Managing_Hosts/master.adoc +++ b/guides/doc-Managing_Hosts/master.adoc @@ -19,6 +19,8 @@ include::common/modules/con_overview-of-hosts.adoc[leveloffset=+1] include::common/assembly_administering-hosts.adoc[leveloffset=+1] +include::common/assembly_working-with-host-groups.adoc[leveloffset=+1] + include::common/assembly_registering-hosts.adoc[leveloffset=+1] include::common/assembly_managing-network-interfaces.adoc[leveloffset=+1]