• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..13-Oct-2021-

tasks/H13-Oct-2021-5148

README.mdH A D24-Aug-20212.9 KiB7158

README.md

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