This file contains 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
# frozen_string_literal: true | |
require 'etc' | |
require 'English' | |
Facter.add(:users) do | |
setcode do | |
users = {} | |
Etc.passwd do |u| | |
sshdir = File.join(u.dir, '.ssh') |
This file contains 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
class timezone ( | |
String $timezone = 'Etc/UTC', | |
Optional[String] $timezone_update = undef | |
) { | |
# data from hiera with a variable inside? | |
if $timezone_update { | |
exec { 'update_timezone': | |
command => $timezone_update, | |
} | |
} |
This file contains 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
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 | |
link/ether 00:1e:67:a4:ba:b6 brd ff:ff:ff:ff:ff:ff | |
inet x.x.116.204/27 brd 5.9.116.223 scope global eth0 | |
valid_lft forever preferred_lft forever | |
inet 192.168.0.2/24 scope global eth0 | |
valid_lft forever preferred_lft forever | |
inet6 xxx:61c5::2/64 scope global | |
valid_lft forever preferred_lft forever | |
inet6 fe80::21e:67ff:fea4:bab6/64 scope link | |
valid_lft forever preferred_lft forever |
This file contains 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
# The filebucket option allows for file backups to the server | |
filebucket { 'main': | |
server => 'puppetmaster.example.com', | |
path => false, | |
} | |
# Set global defaults | |
File { backup => main } |