Skip to content

Commit

Permalink
Merge pull request #80 from ghoneycutt/reference
Browse files Browse the repository at this point in the history
Add REFERENCE.md and ability to generate it
  • Loading branch information
ghoneycutt committed Jan 16, 2019
2 parents de5fd3d + 09c269a commit ce30990
Show file tree
Hide file tree
Showing 3 changed files with 198 additions and 34 deletions.
34 changes: 1 addition & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

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

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

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

## Reference

##### `ensure`
Defines if sssd and its relevant packages are to be installed or removed. Valid values are 'present' and 'absent'.
Type: string
Default: present

##### `config`
Configuration options structured like the sssd.conf file. Array values will be joined into comma-separated lists.
Type: hash
Default:
```puppet
config => {
'sssd' => {
'config_file_version' => '2',
'services' => 'nss, pam',
'domains' => 'ad.example.com',
},
'domain/ad.example.com' => {
'id_provider' => 'ad',
'krb5_realm' => 'AD.EXAMPLE.COM',
'cache_credentials' => true,
},
}
```

##### `mkhomedir`
Set to 'true' to enable auto-creation of home directories on user login.
Type: boolean
Default: true

## Limitations

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

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

[0]: https://docs.pagure.org/SSSD.sssd/
[1]: https://forge.puppet.com/modules?sort=rank&q=adcli
Expand Down
191 changes: 191 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
# Reference
<!-- DO NOT EDIT: This document was generated by Puppet Strings -->

## Table of Contents

**Classes**

* [`sssd`](#sssd): Base sssd class

## Classes

### sssd

Installs and configures SSSD

#### Examples

##### Declaring the class

```puppet
include ::sssd
```

#### Parameters

The following parameters are available in the `sssd` class.

##### `ensure`

Data type: `Enum['present', 'absent']`

Ensure if the sssd config file is to be present or absent.

Default value: 'present'

##### `config`

Data type: `Hash`

Hash containing entire SSSD config.

Default value: {
'sssd' => {
'domains' => $::domain,
'config_file_version' => 2,
'services' => ['nss', 'pam'],
},
"domain/${::domain}" => {
'access_provider' => 'simple',
'simple_allow_users' => ['root'],
},
}

##### `sssd_package`

Data type: `String`

Name of the sssd package. Only set this if your platform
is not supported or you know what you're doing.

Default value: 'sssd'

##### `sssd_package_ensure`

Data type: `String`

Sets the ensure parameter of the sssd package.

Default value: 'present'

##### `sssd_service`

Data type: `String`

Name of the sssd service.

Default value: 'sssd'

##### `extra_packages`

Data type: `Array`

Array of extra packages.

Default value: []

##### `extra_packages_ensure`

Data type: `String`

Value of ensure parameter for extra packages.

Default value: 'present'

##### `config_file`

Data type: `Stdlib::Absolutepath`

Path to the sssd config file.

Default value: '/etc/sssd/sssd.conf'

##### `config_template`

Data type: `String`

Defines the template used for the sssd config.

Default value: 'sssd/sssd.conf.erb'

##### `mkhomedir`

Data type: `Boolean`

Whether or not to manage auto-creation of home directories on
user login.

Default value: `true`

##### `manage_oddjobd`

Data type: `Boolean`

Whether or not to manage the oddjobd service.

Default value: `false`

##### `service_ensure`

Data type: `Variant[Boolean, Enum['running', 'stopped']]`

Ensure if services should be running/stopped.

Default value: 'running'

##### `service_dependencies`

Data type: `Array`

Array of service resource names to manage before
managing sssd related services. Intended to be used to manage messagebus
service to prevent `Error: Could not start Service[oddjobd]`.

Default value: []

##### `enable_mkhomedir_flags`

Data type: `Array`

Array of flags to use with authconfig to enable
auto-creation of home directories.

Default value: [
'--enablesssd',
'--enablesssdauth',
'--enablemkhomedir',
]

##### `disable_mkhomedir_flags`

Data type: `Array`

Array of flags to use with authconfig to disable
auto-creation of home directories.

Default value: [
'--enablesssd',
'--enablesssdauth',
'--disablemkhomedir',
]

##### `pam_mkhomedir_umask`

Data type: `String`

Umask to set for pam_mkhomedir (oddjobd-mkhomedir on RedHat uses UMASK from login.defs)

Default value: '0022'

##### `ensure_absent_flags`

Data type: `Array`

Array of flags to use with authconfig when service
is disabled.

Default value: [
'--disablesssd',
'--disablesssdauth',
]

7 changes: 6 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ require 'puppet-strings/tasks'
desc 'Alias for strings:generate'
task :doc => ['strings:generate']

desc 'Generate REFERENCE.md'
task :reference do
sh 'puppet strings generate --format markdown'
end

desc 'Run all'
task :all => [
:clean,
Expand All @@ -50,7 +55,7 @@ task :all => [

desc 'Run validate, lint and spec tests.'
task :test do
[:lint, :validate, :syntax, :spec, :doc].each do |test|
[:lint, :validate, :syntax, :spec, :doc, :reference].each do |test|
Rake::Task[test].invoke
end
end

0 comments on commit ce30990

Please sign in to comment.