Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P6249
how do I puppet?
Active
Public
Actions
Authored by
•
demon
on Nov 2 2017, 5:50 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F10573463: how do I puppet?
Nov 2 2017, 5:50 PM
2017-11-02 17:50:45 (UTC+0)
Subscribers
None
chad@supersexy /a/puppet ((87f0bd3843...))$ git diff
diff --git a/modules/scap/lib/puppet/provider/scap_source/default.rb b/modules/scap/lib/puppet/provider/scap_source/default.rb
index f901355b17..d87e30e117 100644
--- a/modules/scap/lib/puppet/provider/scap_source/default.rb
+++ b/modules/scap/lib/puppet/provider/scap_source/default.rb
@@ -105,6 +105,21 @@ Puppet::Type.type(:scap_source).provide(:default) do
}
end
+ def init(path)
+ pwd = Etc.getpwnam(resource[:owner])
+ uid = pwd.uid
+ gid = pwd.gid
+ Puppet::Util::Execution.execute(
+ [
+ self.class.command(:scap),
+ 'deploy',
+ '--init',
+ ],
+ :uid => uid,
+ :gid => gid,
+ :failonfail => true
+ )
+
def exists?
# check if the dirs exist; if they do, check
# if they're a git repo.
@@ -140,6 +155,8 @@ Puppet::Type.type(:scap_source).provide(:default) do
target = File.join(target_path, 'scap')
checkout resource[:scap_repository], target
end
+ Puppet.debug("Running 'scap deploy --init' in #{target_path}")
+ init target
end
def destroy
Event Timeline
•
demon
created this paste.
Nov 2 2017, 5:50 PM
2017-11-02 17:50:45 (UTC+0)
Log In to Comment