Skip to content

Commit f86d09e

Browse files
committed
style: improve various READMEs
1 parent 60d02bd commit f86d09e

6 files changed

Lines changed: 423 additions & 157 deletions

File tree

roles/apache_httpd/README.md

Lines changed: 93 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -298,58 +298,58 @@ apache_httpd__conf_trace_enable: 'Off'
298298
* Type: List of dictionaries.
299299
* Default: See [defaults/main.yml](https://github.com/Linuxfabrik/lfops/blob/main/roles/apache_httpd/defaults/main.yml)
300300

301-
Subkeys:
302-
303-
> `enabled`
304-
>
305-
> * Creates a symlink to conf-available/filename.conf in conf-enabled (true), otherwise the link is removed (false).
306-
> * Type: Boolean.
307-
> * Default: `true`
308-
>
309-
> `filename`
310-
>
311-
> * Required. Destination filename in conf-available/, normally equal to the name of the source template used. Suffixed with `.conf`.
312-
> * Type: String.
313-
>
314-
> `state`
315-
>
316-
> * conf-available/filename.conf is created (`present`), otherwise file is removed (`absent`).
317-
> * Type: String.
318-
>
319-
> `template`
320-
>
321-
> * Required. Name of the Jinja template source file to use.
322-
> * Type: String.
301+
* Subkeys:
302+
303+
* `enabled`:
304+
305+
* Optional. Creates a symlink to conf-available/filename.conf in conf-enabled (true), otherwise the link is removed (false).
306+
* Type: Bool.
307+
* Default: `true`
308+
309+
* `filename`:
310+
311+
* Mandatory. Destination filename in conf-available/, normally equal to the name of the source template used. Suffixed with `.conf`.
312+
* Type: String.
313+
314+
* `state`:
315+
316+
* Optional. conf-available/filename.conf is created (`present`), otherwise file is removed (`absent`).
317+
* Type: String.
318+
319+
* `template`:
320+
321+
* Mandatory. Name of the Jinja template source file to use.
322+
* Type: String.
323323

324324
`apache_httpd__htpasswd__group_var` / `apache_httpd__htpasswd__host_var`
325325

326326
* Create and update flat-files for basic authentication of HTTP users.
327327
* Type: List of dictionaries.
328328
* Default: `[]`
329329

330-
Subkeys:
331-
332-
> `password`
333-
>
334-
> * Required. Password.
335-
> * Type: String.
336-
>
337-
> `path`
338-
>
339-
> * Path to the htpasswd file.
340-
> * Type: String.
341-
> * Default: `'/etc/httpd/.htpasswd'`
342-
>
343-
> `state`
344-
>
345-
> * Either `present` or `absent`.
346-
> * Type: String.
347-
> * Default: `'present'`
348-
>
349-
> `username`
350-
>
351-
> * Required. Username.
352-
> * Type: String.
330+
* Subkeys:
331+
332+
* `password`:
333+
334+
* Mandatory. Password.
335+
* Type: String.
336+
337+
* `path`:
338+
339+
* Optional. Path to the htpasswd file.
340+
* Type: String.
341+
* Default: `'/etc/httpd/.htpasswd'`
342+
343+
* `state`:
344+
345+
* Optional. Either `present` or `absent`.
346+
* Type: String.
347+
* Default: `'present'`
348+
349+
* `username`:
350+
351+
* Mandatory. Username.
352+
* Type: String.
353353

354354
`apache_httpd__limit_vhosts`
355355

@@ -363,63 +363,63 @@ Subkeys:
363363
* Type: List of dictionaries.
364364
* Default: See [defaults/main.yml](https://github.com/Linuxfabrik/lfops/blob/main/roles/apache_httpd/defaults/main.yml)
365365

366-
Subkeys:
367-
368-
> `enabled`
369-
>
370-
> * Creates a symlink to mods-available/filename.mods in mods-enabled (true), otherwise the link is removed (false).
371-
> * Type: Boolean.
372-
> * Default: `true`
373-
>
374-
> `filename`
375-
>
376-
> * Required. Destination filename in mods-available/, normally equal to the name of the source template used. Suffixed with `.conf`.
377-
> * Type: String.
378-
>
379-
> `state`
380-
>
381-
> * mods-available/filename.conf is created (`present`), otherwise file is removed (`absent`).
382-
> * Type: String.
383-
>
384-
> `template`
385-
>
386-
> * Name of the Ansible Jinja template source file to use. If omitted, `filename` is used.
387-
> * Type: String.
366+
* Subkeys:
367+
368+
* `enabled`:
369+
370+
* Optional. Creates a symlink to mods-available/filename.mods in mods-enabled (true), otherwise the link is removed (false).
371+
* Type: Bool.
372+
* Default: `true`
373+
374+
* `filename`:
375+
376+
* Mandatory. Destination filename in mods-available/, normally equal to the name of the source template used. Suffixed with `.conf`.
377+
* Type: String.
378+
379+
* `state`:
380+
381+
* Optional. mods-available/filename.conf is created (`present`), otherwise file is removed (`absent`).
382+
* Type: String.
383+
384+
* `template`:
385+
386+
* Optional. Name of the Ansible Jinja template source file to use. If omitted, `filename` is used.
387+
* Type: String.
388388

389389
`apache_httpd__packages__group_var` / `apache_httpd__packages__host_var`
390390

391391
* Packages to install using the OS package manager. Packages are removed first and then added.
392392
* Type: List of dictionaries.
393393
* Default: See [defaults/main.yml](https://github.com/Linuxfabrik/lfops/blob/main/roles/apache_httpd/defaults/main.yml)
394394

395-
Subkeys:
395+
* Subkeys:
396+
397+
* `name`:
398+
399+
* Mandatory. The package name.
400+
* Type: String.
401+
402+
* `state`:
396403

397-
> `name`
398-
>
399-
> * Required. The package name.
400-
> * Type: String.
401-
>
402-
> `state`
403-
>
404-
> * State of the package, one of `present`, `absent`.
405-
> * Type: String.
404+
* Optional. State of the package, one of `present`, `absent`.
405+
* Type: String.
406406

407407
`apache_httpd__skip_document_root_chown`
408408

409409
* Set to true to skip the `chown -R apache:apache` of the document root.
410-
* Type: Boolean.
410+
* Type: Bool.
411411
* Default: `false`
412412

413413
`apache_httpd__skip_php_fpm`
414414

415415
* Skip PHP-FPM configuration globally and in each vHost within Apache. When set to `false` (default), the role automatically injects PHP-FPM `ProxyPass` directives into app, localhost, and wordpress vHosts.
416-
* Type: Boolean.
416+
* Type: Bool.
417417
* Default: `false`
418418

419419
`apache_httpd__systemd_enabled`
420420

421421
* Whether the Apache webserver service should start on boot (true) or not (false).
422-
* Type: Boolean.
422+
* Type: Bool.
423423
* Default: `true`
424424

425425
`apache_httpd__systemd_state`
@@ -463,13 +463,16 @@ apache_httpd__systemd_state: 'started'
463463

464464
## Mandatory Role Variables - vHosts
465465

466-
`apache_httpd__vhosts__group_var` / `apache_httpd__vhosts__host_var`:
466+
`apache_httpd__vhosts__group_var` / `apache_httpd__vhosts__host_var`
467467

468-
`conf_server_name`
468+
* vHost definitions for Apache. See the "Optional Role Variables - vHosts" section below for all available subkeys.
469+
* Type: List of dictionaries.
470+
* Subkeys:
469471

470-
* Set this variable for each vHost definition. Although this is just best practice, we would never use a vHost without a ServerName.
471-
* Type: String.
472+
* `conf_server_name`:
472473

474+
* Mandatory. Set this variable for each vHost definition. Although this is just best practice, we would never use a vHost without a ServerName.
475+
* Type: String.
473476

474477
Example:
475478
```yaml
@@ -513,13 +516,13 @@ This role creates a vHost named `localhost` by default. See [defaults/main.yml](
513516
`allow_accessing_dotfiles`
514517

515518
* app-vHosts block access to files that begin with a period. With this setting you can disable this behavior.
516-
* Type: Boolean.
519+
* Type: Bool.
517520
* Default: `false`
518521

519522
`allow_requests_without_hostname`
520523

521524
* app-vHosts forbid accessing them without a hostname / just by IP. With this setting you can disable this behavior.
522-
* Type: Boolean.
525+
* Type: Bool.
523526
* Default: `false`
524527

525528
`allowed_file_extensions`
@@ -662,7 +665,7 @@ This role creates a vHost named `localhost` by default. See [defaults/main.yml](
662665
`enabled`
663666

664667
* Enable this vHost.
665-
* Type: Boolean.
668+
* Type: Bool.
666669
* Default: `true`
667670

668671
`filename`
@@ -686,13 +689,13 @@ This role creates a vHost named `localhost` by default. See [defaults/main.yml](
686689
`skip_allowed_file_extensions`
687690

688691
* Skips checking file extensions in app- and localhost-vHosts, allowing essentially all file extensions.
689-
* Type: Boolean.
692+
* Type: Bool.
690693
* Default: `false`
691694

692695
`skip_allowed_http_methods`
693696

694697
* Skips checking the HTTP methods in app-, localhost-, proxy-, wordpress-vHosts, allowing essentially all HTTP methods.
695-
* Type: Boolean.
698+
* Type: Bool.
696699
* Default: `false`
697700

698701
`state`
@@ -773,7 +776,7 @@ apache_httpd__mod_log_config_custom_log: 'logs/access.log combined'
773776
`apache_httpd__skip_mod_security_coreruleset`
774777

775778
* Skip the installation of the OWASP ModSecurity Core Rule Set (CRS).
776-
* Type: Boolean.
779+
* Type: Bool.
777780
* Default: `true`
778781

779782
Example:

roles/elasticsearch/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ ansible-playbook --inventory inventory linuxfabrik.lfops.elasticsearch --limit n
221221

222222
* Automatic index creation allows any index to be created automatically.
223223
* For the usage in `host_vars` / `group_vars` (can only be used in one group at a time).
224-
* Type: Boolean.
224+
* Type: Bool.
225225
* Default: `true`
226226

227227
`elasticsearch__ca_cert`
@@ -342,7 +342,7 @@ ansible-playbook --inventory inventory linuxfabrik.lfops.elasticsearch --limit n
342342
`elasticsearch__service_enabled`
343343

344344
* Enables or disables the Elasticsearch service, analogous to `systemctl enable/disable --now`.
345-
* Type: Boolean.
345+
* Type: Bool.
346346
* Default: `true`
347347

348348
`elasticsearch__service_state`

roles/example/README.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ This role also serves as a reference for consistent role development across LFOp
1212
If you use the [Example Playbook](https://github.com/Linuxfabrik/lfops/blob/main/playbooks/example.yml), this is automatically done for you.
1313

1414

15+
## Optional Requirements
16+
17+
* Install the optional dependency. This can be done using the [linuxfabrik.lfops.optional_dependency](https://github.com/Linuxfabrik/lfops/tree/main/roles/optional_dependency) role.
18+
19+
1520
## Tags
1621

1722
`example`
@@ -93,12 +98,36 @@ example__version: '3.2.1'
9398
* Default: `[]`
9499
* Subkeys:
95100

96-
* `name`: Mandatory, string. Username.
97-
* `comment`: Optional, string. User description.
98-
* `group`: Optional, string. Primary group.
99-
* `home`: Optional, string. Home directory.
100-
* `shell`: Optional, string. Login shell.
101-
* `state`: Optional, string. `present` or `absent`. Defaults to `'present'`.
101+
* `name`:
102+
103+
* Mandatory. Username.
104+
* Type: String.
105+
106+
* `comment`:
107+
108+
* Optional. User description.
109+
* Type: String.
110+
111+
* `group`:
112+
113+
* Optional. Primary group.
114+
* Type: String.
115+
116+
* `home`:
117+
118+
* Optional. Home directory.
119+
* Type: String.
120+
121+
* `shell`:
122+
123+
* Optional. Login shell.
124+
* Type: String.
125+
126+
* `state`:
127+
128+
* Optional. `present` or `absent`.
129+
* Type: String.
130+
* Default: `'present'`
102131

103132
Example:
104133
```yaml

0 commit comments

Comments
 (0)