Debian Codegraph @

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

raw symbols SCIP
1 theforeman.foreman.content_views
2 ================================
3
4 This role creates and manages Content Views.
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 The main data structure for this role is the list of `foreman_content_views`. Each Content View requires the following fields:
12
13 - `name` - the name of the content view
14
15 The following fields are required for a content view but have defaults which make them optional for this role:
16
17 - `organization`: Organization to create the content view for. Defaults to `foreman_organization` variable.
18
19 Each content view also requires either a list of repositories or components (for a composite content view):
20 - `repositories` - List of repositories to add to the content view. Each repository requires the following fields:
21 - `name` - The name of the repository
22 - `product` - The product which the repository belongs to
23 - `components` - List of content views to add to the composite content view. Each component requires the following fields:
24 - `content_view` - The name of the content view
25 - `content_view_version` - The version of the content view to add, *or*
26 - `latest` - If `true`, the latest version of the content view will be used
27
28 Additionally you can pass any other parameters accepted by the `content_view` module.
29
30 This role also allows you to create Content View Filters and add them to the Content View by passing a list of `filters`:
31
32 - `filters` - List of filters to create and add to the content view. Each filter needs the following fields:
33 - `name` - Name of the content view filter
34 - `filter_type` - Content view filter type. The available types are `rpm`, `package_group`, `erratum`, or `docker`
35
36 Additionally you can pass any other parameters accepted by the `content_view_filter` module.
37
38 Example Playbooks
39 -----------------
40
41 ```yaml
42 - hosts: localhost
43 roles:
44 - role: theforeman.foreman.content_views
45 vars:
46 foreman_server_url: https://foreman.example.com
47 foreman_username: "admin"
48 foreman_password: "changeme"
49 foreman_organization: "Default Organization"
50 foreman_content_views:
51 - name: RHEL7
52 repositories:
53 - name: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server
54 product: 'Red Hat Enterprise Linux Server'
55 - name: Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64
56 product: 'Red Hat Enterprise Linux Server'
57 - name: Red Hat Satellite Tools 6.8 (for RHEL 7 Server) (RPMs)
58 product: 'Red Hat Enterprise Linux Server'
59 - name: BearApp
60 organization: ACME
61 repositories:
62 - name: MyApps
63 product: ACME
64 filters:
65 - name: "bear app"
66 filter_state: "present"
67 filter_type: "rpm"
68 rule_name: "bear"
69 - name: BearAppServer
70 components:
71 - content_view: RHEL7
72 latest: true
73 - content_view: BearApp
74 latest: true
75 ```