This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Defined type for creating virtual user accounts | |
# | |
define accounts::virtual ($uid,$gid,$realname,$pass,$sshkey="") { | |
@user { $title: | |
ensure => 'present', | |
uid => $uid, | |
gid => $gid, | |
shell => '/bin/bash', | |
home => "/home/${title}", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Defined type for creating virtual user accounts | |
# | |
define accounts::virtual ($uid,$realname,$pass) { | |
user { $title: | |
ensure => 'present', | |
uid => $uid, | |
gid => $title, | |
shell => '/bin/bash', | |
home => "/home/${title}", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Used to define/realize users on Puppet-managed systems | |
# | |
class accounts { | |
@accounts::virtual { 'johndoe': | |
uid => 1001, | |
realname => 'John Doe', | |
pass => '<password hash goes here>', | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node default { | |
} | |
node 'server.domain.net' { | |
include accounts | |
realize (Accounts::Virtual['johndoe']) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<network> | |
<name>ovs-network</name> | |
<forward mode='bridge'/> | |
<bridge name='ovsbr0'/> | |
<virtualport type='openvswitch'/> | |
<portgroup name='vlan-01' default='yes'> | |
</portgroup> | |
<portgroup name='vlan-02'> | |
<vlan> | |
<tag id='2'/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<interface type='network'> | |
<mac address='11:22:33:44:55:66'/> | |
<source network='ovs-network' portgroup='vlan-02'/> | |
</interface> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file { "ntp.conf" : | |
path => "/etc/ntp.conf", | |
owner => "root", | |
group => "root", | |
mode => 644, | |
source => "puppet:///modules/ntp/ntp.conf", | |
} | |
package { "ntp": | |
ensure => installed, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file { "ntp.conf": | |
path => $operatingsystem ? { | |
"OpenBSD" => "/etc/ntpd.conf", | |
default => "/etc/ntp.conf", | |
}, | |
owner => "root", | |
group => $operatingsystem ? { | |
"OpenBSD" => "wheel", | |
default => "root", | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file { "ntp.conf": | |
path => "/etc/ntp.conf", | |
owner => "root", | |
group => "root", | |
mode => 644, | |
source => "puppet:///modules/ntp/ntp.conf", | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File["ntp.conf"] { | |
path => "/etc/ntpd.conf", | |
group => "wheel", | |
source => "puppet:///modules/ntp/ntpd.conf.openbsd", | |
} |
OlderNewer