Debian Codegraph @

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

raw symbols SCIP
1 theforeman.foreman.lifecycle_environments
2 =========================================
3
4 This role creates and manages Lifecycle Environments.
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_lifecycle_environments`. Each `lifecycle_environment` requires the following fields:
12
13 - `name`: The name of the lifecycle environment.
14 - `prior`: The name of the previous lifecycle environment to attach to in
15 sequence. For the first lifecycle environment in a new path, set the prior
16 lifecycle environment to Library. The order of definition matters, ensure that
17 the environments are listed in the order the path would exist. It can't be
18 changed after the lifecycle environment has been created.
19
20 The following fields are required for a lifecycle environment but have defaults which make them optional for this role:
21
22 - `organization`: Organization to create the lifecycle environment for. Defaults to `foreman_organization` variable.
23
24 The following fields are optional and will be omitted by default:
25
26 - `description`: Description of the lifecycle environment
27 - `label`: A permanent label for identifying the lifecycle environment to tools
28 such as subscription-manager. This is created by the server if omitted. It
29 can't be changed after the lifecycle environment has been created.
30
31 Example Playbooks
32 -----------------
33
34 Create a lifecycle environment path with three environments: Library -> Dev -> Test -> Prod
35
36 ```yaml
37 - hosts: localhost
38 roles:
39 - role: theforeman.foreman.lifecycle_environments
40 vars:
41 foreman_server_url: https://foreman.example.com
42 foreman_username: "admin"
43 foreman_password: "changeme"
44 foreman_organization: "Default Organization"
45 foreman_lifecycle_environments:
46 - name: "Dev"
47 prior: "Library"
48 - name: "Test"
49 prior: "Dev"
50 - name: "Prod"
51 prior: "Test"
52 ```
53
54 Create two lifecycle environment paths: Library -> Dev -> Test -> Prod and Library -> QA -> Stage -> Prod
55
56 ```yaml
57 - hosts: localhost
58 roles:
59 - role: theforeman.foreman.lifecycle_environments
60 vars:
61 foreman_server_url: https://foreman.example.com
62 foreman_username: "admin"
63 foreman_password: "changeme"
64 foreman_organization: "Default Organization"
65 foreman_lifecycle_environments:
66 - name: "Dev"
67 prior: "Library"
68 - name: "Test"
69 prior: "Dev"
70 - name: "Prod"
71 prior: "Test"
72
73 - name: "QA"
74 prior: "Library"
75 organization: ACME
76 - name: "Stage"
77 prior: "QA"
78 organization: ACME
79 - name: "Prod"
80 prior: "Stage"
81 organization: ACME
82 ```