You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+126Lines changed: 126 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ When utilizing an image with systemd support (systemd packages are installed, et
10
10
11
11
# Using this collection
12
12
13
+
## Host Requirements
14
+
13
15
The host from which this collection is run (workstation, CI instance, etc.) must meet the following requirements:
14
16
15
17
* Molecule [is installed](https://ansible.readthedocs.io/projects/molecule/installation/) and is executable by the user.
@@ -31,6 +33,130 @@ pip install ansible-core
31
33
32
34
Docker CE can be installed by following the appropriate [installation instructions](https://docs.docker.com/engine/install/) for your OS.
33
35
36
+
## Project requirements
37
+
38
+
Roles within this collection will attempt to discover what type of project they are being utilized in. This is enabled by setting the appropriate `project_type` configuration variable to `auto`. The project type can also be explicitly specified if this is desired.
39
+
40
+
Supported project types:
41
+
*`role`
42
+
*`collection`
43
+
*`monolith`
44
+
45
+
When used with a role or collection, the Galaxy meta information for the role must be configured!
46
+
47
+
### Standalone roles
48
+
49
+
Location: `{{ role_dir }}/meta/main.yml`
50
+
51
+
For standalone roles that are not part of a collection, the minimum required information is:
52
+
```yaml
53
+
galaxy_info:
54
+
author: you
55
+
role_name: cool_stuff
56
+
```
57
+
58
+
It is however strongly recommended that the entire file be updated with the correct information for your role!
59
+
60
+
### Collections
61
+
62
+
Location: `{{ collection_dir }}/galaxy.yml`
63
+
64
+
The following minimum values should be defined:
65
+
* `namespace`
66
+
* `name`
67
+
* `version`
68
+
69
+
It is however also strongly recommended that the entire file be updated with the correct information for your collection!
70
+
71
+
### Monoliths
72
+
73
+
A monolith is a project that contains both roles and playbooks in the same directory structure.
74
+
75
+
This collection supports the following file structure:
76
+
```
77
+
.
78
+
├── ansible.cfg
79
+
├── collections
80
+
│ ├── ansible_collections
81
+
│ └── requirements.yml
82
+
├── inventory
83
+
├── molecule
84
+
│ └── default
85
+
│ ├── [...]
86
+
│ ├── collections.yml
87
+
│ ├── converge.yml
88
+
│ ├── molecule.yml
89
+
│ └── verify.yml
90
+
├── playbooks
91
+
│ ├── configure_toaster
92
+
│ │ ├── main.yml -> rick.yml
93
+
│ │ ├── README.md
94
+
│ │ ├── rick.yml
95
+
│ │ ├── tasks
96
+
│ │ └── vars
97
+
│ ├── configure_server
98
+
│ │ ├── main.yml
99
+
│ │ ├── README.md
100
+
│ │ ├── tasks
101
+
│ │ └── templates
102
+
│ ├── [...]
103
+
│ └── install_things
104
+
│ ├── install-cheese.yml
105
+
│ ├── tasks
106
+
│ └── vars
107
+
├── README.md
108
+
├── roles
109
+
│ ├── powerlevel_9000
110
+
│ │ ├── defaults
111
+
│ │ ├── meta
112
+
│ │ ├── README.md
113
+
│ │ ├── tasks
114
+
│ │ ├── tests
115
+
│ │ └── vars
116
+
│ ├── disks
117
+
│ │ ├── defaults
118
+
│ │ ├── handlers
119
+
│ │ ├── meta
120
+
│ │ ├── README.md
121
+
│ │ ├── tasks
122
+
│ │ ├── templates
123
+
│ │ ├── tests
124
+
│ │ └── vars
125
+
│ ├── [...]
126
+
│ └── something_else
127
+
└── scripts
128
+
```
129
+
130
+
When using this collection within a monolithic repository, make sure that any `ansible.cfg` configuration includes the default ansible locations, or that this collection is installed within the repository.
131
+
132
+
For example, `ansible.cfg` should contain something like:
When configuring molecule testing for individual roles within a monolithic project (creating a `roles/<role_name>/molecule` directory), take care _not_ to name the scenario "default", as there is already a "default" scenario for the monolithic project itself if you have created `molecule/default` as described above! Instead, name your role scenario with a unique name.
Copy file name to clipboardExpand all lines: roles/prepare_controller/README.md
+1-117Lines changed: 1 addition & 117 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,123 +15,7 @@ Project formats currently supported by this role are:
15
15
*`collection`
16
16
*`monolith`
17
17
18
-
## Galaxy meta configuration
19
-
20
-
When used with a role or collection, the Galaxy meta information for the role must be configured!
21
-
22
-
23
-
### Standalone roles
24
-
25
-
Location: `{{ role_dir }}/meta/main.yml`
26
-
27
-
For standalone roles that are not part of a collection, the minimum required information is:
28
-
```yaml
29
-
galaxy_info:
30
-
author: you
31
-
role_name: cool_stuff
32
-
```
33
-
34
-
It is however strongly recommended that the entire file be updated with the correct information for your role!
35
-
36
-
### Collections
37
-
38
-
Location: `{{ collection_dir }}/galaxy.yml`
39
-
40
-
The following minimum values should be defined:
41
-
* `namespace`
42
-
* `name`
43
-
* `version`
44
-
45
-
It is however also strongly recommended that the entire file be updated with the correct information for your collection!
46
-
47
-
### Monoliths
48
-
49
-
A monolith is a project that contains both roles and playbooks in the same directory structure.
50
-
51
-
This collection supports the following file structure:
52
-
```
53
-
.
54
-
├── ansible.cfg
55
-
├── collections
56
-
│ ├── ansible_collections
57
-
│ └── requirements.yml
58
-
├── inventory
59
-
├── molecule
60
-
│ └── default
61
-
│ ├── [...]
62
-
│ ├── collections.yml
63
-
│ ├── converge.yml
64
-
│ ├── molecule.yml
65
-
│ └── verify.yml
66
-
├── playbooks
67
-
│ ├── configure_toaster
68
-
│ │ ├── main.yml -> rick.yml
69
-
│ │ ├── README.md
70
-
│ │ ├── rick.yml
71
-
│ │ ├── tasks
72
-
│ │ └── vars
73
-
│ ├── configure_server
74
-
│ │ ├── main.yml
75
-
│ │ ├── README.md
76
-
│ │ ├── tasks
77
-
│ │ └── templates
78
-
│ ├── [...]
79
-
│ └── install_things
80
-
│ ├── install-cheese.yml
81
-
│ ├── tasks
82
-
│ └── vars
83
-
├── README.md
84
-
├── roles
85
-
│ ├── powerlevel_9000
86
-
│ │ ├── defaults
87
-
│ │ ├── meta
88
-
│ │ ├── README.md
89
-
│ │ ├── tasks
90
-
│ │ ├── tests
91
-
│ │ └── vars
92
-
│ ├── disks
93
-
│ │ ├── defaults
94
-
│ │ ├── handlers
95
-
│ │ ├── meta
96
-
│ │ ├── README.md
97
-
│ │ ├── tasks
98
-
│ │ ├── templates
99
-
│ │ ├── tests
100
-
│ │ └── vars
101
-
│ ├── [...]
102
-
│ └── something_else
103
-
└── scripts
104
-
```
105
-
106
-
When using this collection within a monolithic repository, make sure that any `ansible.cfg` configuration includes the default ansible locations, or that this collection is installed within the repository.
107
-
108
-
For example, `ansible.cfg` should contain something like:
When configuring molecule testing for individual roles within a monolithic project (creating a `roles/<role_name>/molecule` directory), take care _not_ to name the scenario "default", as there is already a "default" scenario for the monolithic project itself if you have created `molecule/default` as described above! Instead, name your role scenario with a unique name.
0 commit comments