puppet_agent_mgr 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -80,7 +80,8 @@ module PuppetAgentMgr
|
|
80
80
|
opts << "--splay" if splay == true
|
81
81
|
opts << "--no-splay" if splay == false
|
82
82
|
opts << "--splaylimit %s" % splaylimit if splaylimit
|
83
|
-
opts << "--noop" if noop
|
83
|
+
opts << "--noop" if noop == true
|
84
|
+
opts << "--no-noop" if noop == false
|
84
85
|
opts << "--environment %s" % environment if environment
|
85
86
|
opts << "--server %s" % host if host
|
86
87
|
opts << "--masterport %s" % port if port
|
@@ -92,7 +93,7 @@ module PuppetAgentMgr
|
|
92
93
|
#
|
93
94
|
# :foreground_run - runs in the foreground a --test run
|
94
95
|
# :signal_daemon - if the daemon is running, sends it USR1 to wake it up
|
95
|
-
# :noop -
|
96
|
+
# :noop - enables or disabled noop mode based on true/false
|
96
97
|
# :tags - an array of tags to limit the run to
|
97
98
|
# :environment - the environment to run
|
98
99
|
# :server - the puppet master to use, can be some.host or some.host:port
|
@@ -113,7 +114,7 @@ module PuppetAgentMgr
|
|
113
114
|
|
114
115
|
splay = options.fetch(:splay, nil)
|
115
116
|
splaylimit = options.fetch(:splaylimit, nil)
|
116
|
-
noop = options.fetch(:noop,
|
117
|
+
noop = options.fetch(:noop, nil)
|
117
118
|
signal_daemon = options.fetch(:signal_daemon, true)
|
118
119
|
foreground_run = options.fetch(:foreground_run, false)
|
119
120
|
environment = options[:environment]
|
@@ -10,12 +10,13 @@ module PuppetAgentMgr::V3
|
|
10
10
|
|
11
11
|
include PuppetAgentMgr::Common
|
12
12
|
|
13
|
-
def initialize
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
def initialize(testing=false)
|
14
|
+
unless Puppet.settings.app_defaults_initialized?
|
15
|
+
require 'puppet/util/run_mode'
|
16
|
+
Puppet.settings.preferred_run_mode = :agent
|
17
|
+
run_mode = Puppet::Util::RunMode[ Puppet.settings.preferred_run_mode ]
|
18
|
+
Puppet.settings.initialize_app_defaults(Puppet::Settings.app_defaults_for_run_mode(run_mode))
|
19
|
+
end
|
19
20
|
end
|
20
21
|
|
21
22
|
# enables the puppet agent, it can now start applying catalogs again
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet_agent_mgr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- R.I.Pienaar
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-09-
|
18
|
+
date: 2012-09-28 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|