Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nest
Forks
Puppet Portage
Commits
b96ac38a
Commit
b96ac38a
authored
Sep 10, 2014
by
Artem Sidorenko
Browse files
parameter to allow usage of custom overlay lists with layman
parent
e8b94e69
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
2 deletions
+18
-2
README.markdown
README.markdown
+7
-0
lib/puppet/provider/layman/layman.rb
lib/puppet/provider/layman/layman.rb
+6
-1
lib/puppet/type/layman.rb
lib/puppet/type/layman.rb
+4
-0
spec/unit/type/layman_spec.rb
spec/unit/type/layman_spec.rb
+1
-1
No files found.
README.markdown
View file @
b96ac38a
...
@@ -151,6 +151,13 @@ The `layman` type/provider can be used to manage overlays via `layman`.
...
@@ -151,6 +151,13 @@ The `layman` type/provider can be used to manage overlays via `layman`.
ensure => present,
ensure => present,
}
}
Custom overlay list can be used via
`overlay_list`
parameter.
layman { 'custom-overlay':
ensure => present,
overlay_list => 'https://some.xml.file.somethere',
}
## Installation of Gentoo tools
## Installation of Gentoo tools
This module can also handle the installation of various Gentoo tools.
This module can also handle the installation of various Gentoo tools.
...
...
lib/puppet/provider/layman/layman.rb
View file @
b96ac38a
...
@@ -30,7 +30,12 @@ Puppet::Type.type(:layman).provide(:layman) do
...
@@ -30,7 +30,12 @@ Puppet::Type.type(:layman).provide(:layman) do
end
end
def
create
def
create
self
.
class
.
run_layman
(
'--add'
,
resource
[
:name
])
layman_args
=
[]
if
resource
[
:overlay_list
]
layman_args
.
push
(
'-o'
,
resource
[
:overlay_list
])
end
layman_args
.
push
(
'--add'
,
resource
[
:name
])
self
.
class
.
run_layman
(
layman_args
)
@property_hash
[
:ensure
]
=
:present
@property_hash
[
:ensure
]
=
:present
end
end
...
...
lib/puppet/type/layman.rb
View file @
b96ac38a
...
@@ -10,4 +10,8 @@ Puppet::Type.newtype(:layman) do
...
@@ -10,4 +10,8 @@ Puppet::Type.newtype(:layman) do
newparam
(
:name
,
:namevar
=>
true
)
do
newparam
(
:name
,
:namevar
=>
true
)
do
desc
"The name of the overlay"
desc
"The name of the overlay"
end
end
newparam
(
:overlay_list
)
do
desc
"URL of additional overlay list"
end
end
end
spec/unit/type/layman_spec.rb
View file @
b96ac38a
...
@@ -8,7 +8,7 @@ describe Puppet::Type.type(:layman) do
...
@@ -8,7 +8,7 @@ describe Puppet::Type.type(:layman) do
end
end
describe
"when validating attributes"
do
describe
"when validating attributes"
do
params
=
[
:name
]
params
=
[
:name
,
:overlay_list
]
properties
=
[
:ensure
]
properties
=
[
:ensure
]
params
.
each
do
|
param
|
params
.
each
do
|
param
|
...
...
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