Skip to content

Commit 09c269a

Browse files
committed
Add REFERENCE.md and ability to generate it
1 parent de5fd3d commit 09c269a

File tree

3 files changed

+198
-34
lines changed

3 files changed

+198
-34
lines changed

README.md

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
1. [Overview](#overview)
1111
2. [Usage - Configuration options and additional functionality](#usage)
12-
3. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
1312
4. [Limitations - OS compatibility, etc.](#limitations)
1413
5. [Credits](#credits)
1514

@@ -118,37 +117,6 @@ $ sudo adcli join ad.example.com
118117

119118
Or you can use a relevant [module][1] for automation.
120119

121-
## Reference
122-
123-
##### `ensure`
124-
Defines if sssd and its relevant packages are to be installed or removed. Valid values are 'present' and 'absent'.
125-
Type: string
126-
Default: present
127-
128-
##### `config`
129-
Configuration options structured like the sssd.conf file. Array values will be joined into comma-separated lists.
130-
Type: hash
131-
Default:
132-
```puppet
133-
config => {
134-
'sssd' => {
135-
'config_file_version' => '2',
136-
'services' => 'nss, pam',
137-
'domains' => 'ad.example.com',
138-
},
139-
'domain/ad.example.com' => {
140-
'id_provider' => 'ad',
141-
'krb5_realm' => 'AD.EXAMPLE.COM',
142-
'cache_credentials' => true,
143-
},
144-
}
145-
```
146-
147-
##### `mkhomedir`
148-
Set to 'true' to enable auto-creation of home directories on user login.
149-
Type: boolean
150-
Default: true
151-
152120
## Limitations
153121

154122
Tested on:
@@ -167,7 +135,7 @@ series of this module will drop support for Puppet v3.
167135
## Credits
168136

169137
* sssd.conf template from [walkamongus-sssd][2] by Chadwick Banning
170-
* See CHANGELOG file for additional credits
138+
* See `CHANGELOG.md` file for additional credits
171139

172140
[0]: https://docs.pagure.org/SSSD.sssd/
173141
[1]: https://forge.puppet.com/modules?sort=rank&q=adcli

REFERENCE.md

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
# Reference
2+
<!-- DO NOT EDIT: This document was generated by Puppet Strings -->
3+
4+
## Table of Contents
5+
6+
**Classes**
7+
8+
* [`sssd`](#sssd): Base sssd class
9+
10+
## Classes
11+
12+
### sssd
13+
14+
Installs and configures SSSD
15+
16+
#### Examples
17+
18+
##### Declaring the class
19+
20+
```puppet
21+
include ::sssd
22+
```
23+
24+
#### Parameters
25+
26+
The following parameters are available in the `sssd` class.
27+
28+
##### `ensure`
29+
30+
Data type: `Enum['present', 'absent']`
31+
32+
Ensure if the sssd config file is to be present or absent.
33+
34+
Default value: 'present'
35+
36+
##### `config`
37+
38+
Data type: `Hash`
39+
40+
Hash containing entire SSSD config.
41+
42+
Default value: {
43+
'sssd' => {
44+
'domains' => $::domain,
45+
'config_file_version' => 2,
46+
'services' => ['nss', 'pam'],
47+
},
48+
"domain/${::domain}" => {
49+
'access_provider' => 'simple',
50+
'simple_allow_users' => ['root'],
51+
},
52+
}
53+
54+
##### `sssd_package`
55+
56+
Data type: `String`
57+
58+
Name of the sssd package. Only set this if your platform
59+
is not supported or you know what you're doing.
60+
61+
Default value: 'sssd'
62+
63+
##### `sssd_package_ensure`
64+
65+
Data type: `String`
66+
67+
Sets the ensure parameter of the sssd package.
68+
69+
Default value: 'present'
70+
71+
##### `sssd_service`
72+
73+
Data type: `String`
74+
75+
Name of the sssd service.
76+
77+
Default value: 'sssd'
78+
79+
##### `extra_packages`
80+
81+
Data type: `Array`
82+
83+
Array of extra packages.
84+
85+
Default value: []
86+
87+
##### `extra_packages_ensure`
88+
89+
Data type: `String`
90+
91+
Value of ensure parameter for extra packages.
92+
93+
Default value: 'present'
94+
95+
##### `config_file`
96+
97+
Data type: `Stdlib::Absolutepath`
98+
99+
Path to the sssd config file.
100+
101+
Default value: '/etc/sssd/sssd.conf'
102+
103+
##### `config_template`
104+
105+
Data type: `String`
106+
107+
Defines the template used for the sssd config.
108+
109+
Default value: 'sssd/sssd.conf.erb'
110+
111+
##### `mkhomedir`
112+
113+
Data type: `Boolean`
114+
115+
Whether or not to manage auto-creation of home directories on
116+
user login.
117+
118+
Default value: `true`
119+
120+
##### `manage_oddjobd`
121+
122+
Data type: `Boolean`
123+
124+
Whether or not to manage the oddjobd service.
125+
126+
Default value: `false`
127+
128+
##### `service_ensure`
129+
130+
Data type: `Variant[Boolean, Enum['running', 'stopped']]`
131+
132+
Ensure if services should be running/stopped.
133+
134+
Default value: 'running'
135+
136+
##### `service_dependencies`
137+
138+
Data type: `Array`
139+
140+
Array of service resource names to manage before
141+
managing sssd related services. Intended to be used to manage messagebus
142+
service to prevent `Error: Could not start Service[oddjobd]`.
143+
144+
Default value: []
145+
146+
##### `enable_mkhomedir_flags`
147+
148+
Data type: `Array`
149+
150+
Array of flags to use with authconfig to enable
151+
auto-creation of home directories.
152+
153+
Default value: [
154+
'--enablesssd',
155+
'--enablesssdauth',
156+
'--enablemkhomedir',
157+
]
158+
159+
##### `disable_mkhomedir_flags`
160+
161+
Data type: `Array`
162+
163+
Array of flags to use with authconfig to disable
164+
auto-creation of home directories.
165+
166+
Default value: [
167+
'--enablesssd',
168+
'--enablesssdauth',
169+
'--disablemkhomedir',
170+
]
171+
172+
##### `pam_mkhomedir_umask`
173+
174+
Data type: `String`
175+
176+
Umask to set for pam_mkhomedir (oddjobd-mkhomedir on RedHat uses UMASK from login.defs)
177+
178+
Default value: '0022'
179+
180+
##### `ensure_absent_flags`
181+
182+
Data type: `Array`
183+
184+
Array of flags to use with authconfig when service
185+
is disabled.
186+
187+
Default value: [
188+
'--disablesssd',
189+
'--disablesssdauth',
190+
]
191+

Rakefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ require 'puppet-strings/tasks'
4141
desc 'Alias for strings:generate'
4242
task :doc => ['strings:generate']
4343

44+
desc 'Generate REFERENCE.md'
45+
task :reference do
46+
sh 'puppet strings generate --format markdown'
47+
end
48+
4449
desc 'Run all'
4550
task :all => [
4651
:clean,
@@ -50,7 +55,7 @@ task :all => [
5055

5156
desc 'Run validate, lint and spec tests.'
5257
task :test do
53-
[:lint, :validate, :syntax, :spec, :doc].each do |test|
58+
[:lint, :validate, :syntax, :spec, :doc, :reference].each do |test|
5459
Rake::Task[test].invoke
5560
end
5661
end

0 commit comments

Comments
 (0)