Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
puppet-backupninja
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chris
puppet-backupninja
Commits
e188dd8f
Commit
e188dd8f
authored
Jun 05, 2010
by
Silvio Rhatto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trying a different approach to realize exported resources
parent
b17704f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
34 deletions
+14
-34
manifests/server.pp
manifests/server.pp
+14
-34
No files found.
manifests/server.pp
View file @
e188dd8f
define
backupninja_server_realize
(
$host
)
{
User
<
<|
tag
==
"backupninja-
$host
"
|>
>
File
<
<|
tag
==
"backupninja-
$host
"
|>
>
Ssh_authorized_key
<
<|
tag
==
"backupninja-
$host
"
|>
>
}
class
backupninja::server
{
$real_backupdir
=
$backupdir
?
{
...
...
@@ -46,9 +52,8 @@ class backupninja::server {
}
}
User
<
<|
tag
==
"backupninja-
$real_backupserver_tag
"
|>
>
File
<
<|
tag
==
"backupninja-
$real_backupserver_tag
"
|>
>
Ssh_authorized_key
<
<|
tag
==
"backupninja-
$real_backupserver_tag
"
|>
>
# collect all resources from hosted backups
Backupninja_server_realize
<|
tag
==
"
$real_backupserver_tag
"
|>
if
!
defined
(
Package
[
"rsync"
])
{
if
$rsync_ensure_version
==
''
{
$rsync_ensure_version
=
'installed'
}
...
...
@@ -91,7 +96,7 @@ class backupninja::server {
default
=>
$authorized_keys_file
,
}
$real_backuptag
=
$backuptag
?
{
false
=>
"backupninja-
$
real_host
"
,
false
=>
"backupninja-
$
fqdn
"
,
default
=>
$backuptag
,
}
...
...
@@ -105,6 +110,11 @@ class backupninja::server {
nagios2::passive_service
{
"backups-
${name}
"
:
nagios2_host_name
=>
$real_host
,
nagios2_description
=>
$real_nagios2_description
,
servicegroups
=>
"backups"
}
}
@@
backupninja_server_realize
{
"
${fqdn}
-
${real_host}
"
:
host
=>
$fqdn
,
tag
=>
$real_host
,
}
if
!
defined
(
File
[
"
$real_dir
"
])
{
@@
file
{
"
$real_dir
"
:
ensure
=>
directory
,
...
...
@@ -112,11 +122,6 @@ class backupninja::server {
tag
=>
"
$real_backuptag
"
,
}
}
else
{
File
[
"
$real_dir
"
]
{
tag
+>
"
$real_backuptag
"
,
}
}
case
$installuser
{
true
:
{
case
$manage_ssh_dir
{
...
...
@@ -129,11 +134,6 @@ class backupninja::server {
tag
=>
"
$real_backuptag
"
,
}
}
else
{
File
[
"
$real_ssh_dir
"
]
{
tag
+>
"
$real_backuptag
"
,
}
}
}
}
case
$key
{
...
...
@@ -147,11 +147,6 @@ class backupninja::server {
tag
=>
"
$real_backuptag
"
,
}
}
else
{
File
[
"
${real_ssh_dir}
/
${real_authorized_keys_file}
"
]
{
tag
+>
"
$real_backuptag
"
,
}
}
}
default
:
{
if
!
defined
(
Ssh_autorized_key
[
"
$real_user
"
])
{
...
...
@@ -164,11 +159,6 @@ class backupninja::server {
require
=>
User
[
$real_user
],
}
}
else
{
Ssh_authorized_key
[
"
$real_user
"
]
{
tag
+>
"
$real_backuptag
"
,
}
}
}
}
case
$uid
{
...
...
@@ -186,11 +176,6 @@ class backupninja::server {
tag
=>
"
$real_backuptag
"
}
}
else
{
User
[
"
$real_user
"
]
{
tag
+>
"
$real_backuptag
"
,
}
}
}
default
:
{
if
!
defined
(
User
[
"
$real_user
"
])
{
...
...
@@ -207,11 +192,6 @@ class backupninja::server {
tag
=>
"
$real_backuptag
"
}
}
else
{
User
[
"
$real_user
"
]
{
tag
+>
"
$real_backuptag
"
,
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment