Commit 725f2f5b authored by Victor Penso's avatar Victor Penso
Browse files

Support execute

parent f5ee8aff
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
directory directory
file file
link link
execute
bash
service service
systemd_unit systemd_unit
route route
......
...@@ -2,15 +2,19 @@ name "systemd" ...@@ -2,15 +2,19 @@ name "systemd"
description "Systemd configuration for testing" description "Systemd configuration for testing"
run_list( "recipe[base]" ) run_list( "recipe[base]" )
default_attributes( default_attributes(
package: [ package: [
'systemd-networkd', 'systemd-networkd',
'systemd-resolved' 'systemd-resolved'
], ],
directory: { directory: {
'/etc/systemd/network': { recursive: true }, '/etc/systemd/network': { recursive: true },
'/etc/systemd/journald.conf.d': { recursive: true } '/etc/systemd/journald.conf.d': { recursive: true }
}, },
file: { file: {
'/etc/systemd/network/50-dhcp.network': { '/etc/systemd/network/50-dhcp.network': {
content: ' content: '
[Match] [Match]
...@@ -20,6 +24,10 @@ default_attributes( ...@@ -20,6 +24,10 @@ default_attributes(
DHCP=yes DHCP=yes
' '
}, },
##
# Configure DNS resolution
#
'/etc/systemd/resolved.conf': { '/etc/systemd/resolved.conf': {
content: ' content: '
[Resolve] [Resolve]
...@@ -30,18 +38,41 @@ default_attributes( ...@@ -30,18 +38,41 @@ default_attributes(
', ',
notifies: [ :restart, 'systemd_unit[systemd-resolved.service]' ] notifies: [ :restart, 'systemd_unit[systemd-resolved.service]' ]
}, },
##
# Configure journald to store log file persistently
#
'/etc/systemd/journald.conf.d/journal-storage.conf': { '/etc/systemd/journald.conf.d/journal-storage.conf': {
content: ' content: '
[Journal] [Journal]
Storage=persistent 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_unit: {
'systemd-networkd.service': { action: [:enable,:start] }, 'systemd-networkd.service': { action: [:enable,:start] },
'systemd-resolved.service': { action: [:enable,:start] }, 'systemd-resolved.service': { action: [:enable,:start] },
'systemd-logind.service': { action: :enable }, 'systemd-logind.service': { action: :enable },
'systemd-journald.service': { action: [:enable,:start] }, 'systemd-journald.service': { action: [:enable,:start] },
'set-timezone.service': { 'set-timezone.service': {
content: ' content: '
[Unit] [Unit]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment