diff --git a/manifests/vpn/node_key.pp b/manifests/vpn/node_key.pp deleted file mode 100644 index 8b4c59a..0000000 --- a/manifests/vpn/node_key.pp +++ /dev/null @@ -1,35 +0,0 @@ -define tinc::vpn::node_key_priv( - $ensure = present, - $netname = 'ring0', - $key = '' -){ - # put key into /etc/tinc/${netname}/rsa_key.priv - file{"/etc/tinc/${netname}/rsa_key.priv": - source => "puppet:///modules/site-tinc/keys/$fqdn/rsa_key.priv", - owner => root, group => 0, mode => 0644; - } -} - -define tinc::vpn::node_key_pub( - $ensure = present, - $netname = 'ring0', - $key = '' -){ - # put key into /etc/tinc/${netname}/rsa_key.pub - file{"/etc/tinc/${netname}/rsa_key.pub": - source => "puppet:///modules/site-tinc/keys/$fqdn/rsa_key.pub", - owner => root, group => 0, mode => 0644; - } -} - -define tinc::vpn::node_keys ( - $ensure = present, - $netname = 'ring0' -){ - # add ${name} to file /etc/tinc/nets.boot => autostart - # tinc::base::add_to_nets.boot{"${name}":} - - tinc::vpn::node_key_priv{"${name}": } - tinc::vpn::node_key_pub{"${name}": } -} - diff --git a/manifests/vpn/node_key_priv.pp b/manifests/vpn/node_key_priv.pp new file mode 100644 index 0000000..e1753d5 --- /dev/null +++ b/manifests/vpn/node_key_priv.pp @@ -0,0 +1,11 @@ +define tinc::vpn::node_key_priv( + $ensure = present, + $netname = 'ring0', + $key = '' +){ + # put key into /etc/tinc/${netname}/rsa_key.priv + file{"/etc/tinc/${netname}/rsa_key.priv": + source => "puppet:///modules/site-tinc/keys/$fqdn/rsa_key.priv", + owner => root, group => 0, mode => 0644; + } +} diff --git a/manifests/vpn/node_key_pub.pp b/manifests/vpn/node_key_pub.pp new file mode 100644 index 0000000..5b9ae72 --- /dev/null +++ b/manifests/vpn/node_key_pub.pp @@ -0,0 +1,11 @@ +define tinc::vpn::node_key_pub( + $ensure = present, + $netname = 'ring0', + $key = '' +){ + # put key into /etc/tinc/${netname}/rsa_key.pub + file{"/etc/tinc/${netname}/rsa_key.pub": + source => "puppet:///modules/site-tinc/keys/$fqdn/rsa_key.pub", + owner => root, group => 0, mode => 0644; + } +} diff --git a/manifests/vpn/node_keys.pp b/manifests/vpn/node_keys.pp new file mode 100644 index 0000000..a77b869 --- /dev/null +++ b/manifests/vpn/node_keys.pp @@ -0,0 +1,11 @@ +define tinc::vpn::node_keys ( + $ensure = present, + $netname = 'ring0' +){ + # add ${name} to file /etc/tinc/nets.boot => autostart + # tinc::base::add_to_nets.boot{"${name}":} + + tinc::vpn::node_key_priv{"${name}": } + tinc::vpn::node_key_pub{"${name}": } +} +