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
| #!/opt/puppetlabs/puppet/bin/ruby | |
| require 'yaml' | |
| require 'puppet' | |
| require 'puppet/ssl/certificate_request' | |
| retcode = 1 | |
| begin | |
| clientcert = ARGV.pop |
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
| PUB_KEY=$(cat /root/.ssh/id_rsa.pub) | |
| echo "{\"title\":\"puppet master key\",\"key\":\""${PUB_KEY}"\"}" > input.data | |
| curl -H 'Content-Type: application/json' -X POST -d @input.data http://puppet:puppetlabs@localhost:3000/api/v1/admin/users/puppet/keys | |
| if [ $? -ne 0 ]; then | |
| echo "Gogs: Failed to create public key" | |
| exit 6 | |
| fi |
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
| puppet module install kschu91-gogs --version 1.2.0 | |
| puppet apply -e ' | |
| $secret_key = "mysecretkey" | |
| class {"::gogs": | |
| version => "0.11.19", | |
| app_ini => { | |
| "APP_NAME" => "TSE Demo Master Git Server", | |
| "RUN_USER" => "git", |
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
| class dwnld_proxy::new ( | |
| String $source = 'http://master.demo.lan/proxy/proxy.pac', | |
| ){ | |
| file {'/Users/mcadorette/adhoc/proxy.pac': | |
| ensure => present, | |
| source => $source, | |
| backup => '.bak', | |
| } |
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
| class dwnld_proxy ( | |
| String $source = 'http://master.demo.lan/proxy/proxy.pac', | |
| ){ | |
| remote_file { '/Users/mcadorette/adhoc/proxy.pac.source': | |
| ensure => latest, | |
| source => $source, | |
| } | |
| file {'/Users/mcadorette/adhoc/proxy.pac': |
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
| include ::apache | |
| apache::mod {'jk': } | |
| $mod_jk_conf = @("JKCONFIG"/L) | |
| # simple configuration for apache (for AJP connector, modul mod_jk.so) | |
| <IfModule mod_jk.c> | |
| JkWorkersFile /etc/httpd/conf.d/workers.properties | |
| JkLogFile /var/log/httpd/mod_jk.log |
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
| class profile::tripwire ( | |
| $master_host, | |
| $master_port, | |
| $master_passcode, | |
| $version, | |
| $source, | |
| $archive_name = "tripwire-${version}-linux-${::architecture}.tar.gz", | |
| ) | |
| { |
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
| class profile::fileserver ( | |
| $user = 'root', | |
| $group = 'root', | |
| ) { | |
| include 'stdlib' | |
| include 'apache' | |
| ensure_resource('file', '/opt/fileserver', { 'ensure' => 'directory', 'owner' => "${user}", 'group' => "${group}"}) |
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
| class {'::hiera': | |
| hierarchy => [ | |
| 'nodes/%{fqdn}', | |
| 'role/%{role}/%{location}', | |
| 'role/%{role}/%{tier}', | |
| 'role/%{role}', | |
| '%{location}', | |
| 'common', | |
| 'setup', | |
| ], |
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
| class profile::sysctl ( | |
| String $ip_forward = '0', | |
| String $tcp_max_syn_backlog = '1280', | |
| String $accept_source_route = '0', | |
| String $icmp_echo_ignore_broadcasts = '1', | |
| String $rp_filter = '1', | |
| String $all_secure_redirects = '0', | |
| String $all_accept_redirects = '0', | |
| String $default_secure_redirects = '0', | |
| String $default_accept_redirects = '0', |