OP#828 add basic structure and installation
This commit is contained in:
@@ -58,7 +58,7 @@ via site.pp or nodes.pp
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
node 'example.example.net' {
|
node 'example.example.net' {
|
||||||
include confdroid_chrony
|
include confdroid_ntp
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
10
manifests/main/dirs.pp
Normal file
10
manifests/main/dirs.pp
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#### confdroid_ntp::main::dirs.pp
|
||||||
|
# Module name: confdroid_ntp
|
||||||
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
|
# @summary Class manages directories for the confdroid_ntp module
|
||||||
|
###############################################################################
|
||||||
|
class confdroid_ntp::main::dirs (
|
||||||
|
|
||||||
|
) inherits confdroid_ntp::params {
|
||||||
|
require confdroid_ntp::main::install
|
||||||
|
}
|
||||||
10
manifests/main/files.pp
Normal file
10
manifests/main/files.pp
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#### confdroid_ntp::main::files.pp
|
||||||
|
# Module name: confdroid_ntp
|
||||||
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
|
# @summary Class manages files for the confdroid_ntp module
|
||||||
|
###############################################################################
|
||||||
|
class confdroid_ntp::main::files (
|
||||||
|
|
||||||
|
) inherits confdroid_ntp::params {
|
||||||
|
require confdroid_ntp::main::dirs
|
||||||
|
}
|
||||||
12
manifests/main/install.pp
Normal file
12
manifests/main/install.pp
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#### confdroid_ntp::main::install.pp
|
||||||
|
# Module name: confdroid_ntp
|
||||||
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
|
# @summary Class manages installation for the confdroid_ntp module
|
||||||
|
###############################################################################
|
||||||
|
class confdroid_ntp::main::install (
|
||||||
|
|
||||||
|
) inherits confdroid_ntp::params {
|
||||||
|
package { $cy_reqpackages:
|
||||||
|
ensure => $cy_pkg_ensure,
|
||||||
|
}
|
||||||
|
}
|
||||||
10
manifests/main/service.pp
Normal file
10
manifests/main/service.pp
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#### confdroid_ntp::main::service.pp
|
||||||
|
# Module name: confdroid_ntp
|
||||||
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
|
# @summary Class manages services for the confdroid_ntp module
|
||||||
|
###############################################################################
|
||||||
|
class confdroid_ntp::main::service (
|
||||||
|
|
||||||
|
) inherits confdroid_ntp::params {
|
||||||
|
require confdroid_ntp::main::files
|
||||||
|
}
|
||||||
@@ -2,8 +2,16 @@
|
|||||||
# Module name: confdroid_ntp
|
# Module name: confdroid_ntp
|
||||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class contains all parameters for the confdroid_ntp module.
|
# @summary Class contains all parameters for the confdroid_ntp module.
|
||||||
|
# @param [Array] cy_reqpackages List of required packages to install
|
||||||
|
# for the confdroid_ntp module.
|
||||||
|
# @param [String] cy_pkg_ensure Ensure state of the required packages.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class confdroid_ntp::params (
|
class confdroid_ntp::params (
|
||||||
|
|
||||||
|
# installation
|
||||||
|
Array $cy_reqpackages = ['chrony'],
|
||||||
|
String $cy_pkg_ensure = 'present',
|
||||||
|
|
||||||
) {
|
) {
|
||||||
# defaults
|
# defaults
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
|
|||||||
Reference in New Issue
Block a user