Debian Codegraph @

ansible_collections/theforeman/foreman/roles/hostgroups/README.md

raw symbols SCIP
1 theforeman.foreman.hostgroups
2 =============================
3
4 This role creates and manages Hostgroups.
5
6 Role Variables
7 --------------
8
9 This role supports the [Common Role Variables](https://github.com/theforeman/foreman-ansible-modules/blob/develop/README.md#common-role-variables).
10
11 - `foreman_hostgroups`: List of hostgroups to manage that are each represented as a dictionary. See module documentation for a list of available options for each hostgroup.
12 Hostgroups may have any set of fields defined on them and may optionally define a `parent` for nested hostgroups.
13 A variety of examples are demonstrated in the data structure below:
14
15 ```yaml
16 foreman_hostgroups:
17 - name: "Basic example"
18 architecture: "x86_64"
19 operatingsystem: "CentOS"
20 medium: "media_name"
21 ptable: "partition_table_name"
22 - name: "Proxies hostgroup"
23 environment: production
24 puppet_proxy: puppet-proxy.example.com
25 puppet_ca_proxy: puppet-proxy.example.com
26 openscap_proxy: openscap-proxy.example.com
27 - name: "CentOS 7"
28 organization: "Default Organization"
29 lifecycle_environment: "Production"
30 content_view: "CentOS 7"
31 activation_keys: centos-7
32 - name: "Webserver"
33 parent: "CentOS 7"
34 environment: production
35 puppet_proxy: puppet-proxy.example.com
36 puppet_ca_proxy: puppet-proxy.example.com
37 openscap_proxy: openscap-proxy.example.com
38 ```
39
40 Example Playbooks
41 -----------------
42
43 This example creates several hostgroups with some nested examples.
44
45 ```yaml
46 - hosts: localhost
47 roles:
48 - role: theforeman.foreman.hostgroups
49 vars:
50 foreman_server_url: https://foreman.example.com
51 foreman_username: "admin"
52 foreman_password: "changeme"
53 foreman_hostgroups:
54 - name: "Basic example"
55 architecture: "x86_64"
56 operatingsystem: "CentOS"
57 medium: "media_name"
58 ptable: "partition_table_name"
59 - name: "Proxies hostgroup"
60 environment: production
61 puppet_proxy: puppet-proxy.example.com
62 puppet_ca_proxy: puppet-proxy.example.com
63 openscap_proxy: openscap-proxy.example.com
64 - name: "CentOS 7"
65 organization: "Default Organization"
66 lifecycle_environment: "Production"
67 content_view: "CentOS 7"
68 activation_keys: centos-7
69 - name: "Webserver"
70 parent: "CentOS 7"
71 environment: production
72 puppet_proxy: puppet-proxy.example.com
73 puppet_ca_proxy: puppet-proxy.example.com
74 openscap_proxy: openscap-proxy.example.com
75 ```