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
CHEF
cookbooks
base
Commits
725f2f5b
Commit
725f2f5b
authored
May 26, 2017
by
Victor Penso
Browse files
Support execute
parent
f5ee8aff
Changes
2
Hide whitespace changes
Inline
Side-by-side
recipes/default.rb
View file @
725f2f5b
...
...
@@ -26,6 +26,8 @@
directory
file
link
execute
bash
service
systemd_unit
route
...
...
test/roles/systemd.rb
View file @
725f2f5b
...
...
@@ -2,15 +2,19 @@ name "systemd"
description
"Systemd configuration for testing"
run_list
(
"recipe[base]"
)
default_attributes
(
package:
[
'systemd-networkd'
,
'systemd-resolved'
],
directory:
{
'/etc/systemd/network'
:
{
recursive:
true
},
'/etc/systemd/journald.conf.d'
:
{
recursive:
true
}
},
file:
{
'/etc/systemd/network/50-dhcp.network'
:
{
content:
'
[Match]
...
...
@@ -20,6 +24,10 @@ default_attributes(
DHCP=yes
'
},
##
# Configure DNS resolution
#
'/etc/systemd/resolved.conf'
:
{
content:
'
[Resolve]
...
...
@@ -30,18 +38,41 @@ default_attributes(
'
,
notifies:
[
:restart
,
'systemd_unit[systemd-resolved.service]'
]
},
##
# Configure journald to store log file persistently
#
'/etc/systemd/journald.conf.d/journal-storage.conf'
:
{
content:
'
[Journal]
Storage=persistent
'
'
,
notifies:
[
:restart
,
'systemd_unit[systemd-journald.service]'
]
}
},
execute:
{
##
# Enable persistent journald change without reboot...
#
'systemd-tmpfiles --create --prefix /var/log/journal'
:
{
creates:
'/var/log/journal'
,
notifies:
[
:restart
,
'systemd_unit[systemd-journald.service]'
]
}
},
systemd_unit:
{
'systemd-networkd.service'
:
{
action:
[
:enable
,
:start
]
},
'systemd-resolved.service'
:
{
action:
[
:enable
,
:start
]
},
'systemd-logind.service'
:
{
action: :enable
},
'systemd-journald.service'
:
{
action:
[
:enable
,
:start
]
},
'set-timezone.service'
:
{
content:
'
[Unit]
...
...
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