-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from jordiprats/master
ubuntu 18.04 + resolved
- Loading branch information
Showing
8 changed files
with
85 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class systemd::resolved ( | ||
$manage_service = true, | ||
$manage_docker_service = true, | ||
$service_ensure = 'running', | ||
$service_enable = true, | ||
$dns = [], | ||
$fallback_dns = [], | ||
$dns_stub_listener = true, | ||
$dnssec = false, | ||
$cache = true, | ||
) inherits systemd::params { | ||
|
||
|
||
class { '::systemd::resolved::config': } ~> | ||
class { '::systemd::resolved::service': } -> | ||
Class['::systemd::resolved'] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class systemd::resolved::config inherits systemd::resolved { | ||
|
||
Exec { | ||
path => '/bin:/sbin:/usr/bin:/usr/sbin', | ||
} | ||
|
||
file { '/etc/systemd/resolved.conf': | ||
ensure => 'present', | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0644', | ||
content => template("${module_name}/resolved.erb"), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class systemd::resolved::service inherits systemd::resolved { | ||
|
||
$is_docker_container_var=getvar('::eyp_docker_iscontainer') | ||
$is_docker_container=str2bool($is_docker_container_var) | ||
|
||
if( $is_docker_container==false or | ||
$systemd::resolved::manage_docker_service) | ||
{ | ||
if($systemd::resolved::manage_service) | ||
{ | ||
service { 'systemd-resolved': | ||
ensure => $systemd::resolved::service_ensure, | ||
enable => $systemd::resolved::service_enable, | ||
hasstatus => true, | ||
hasrestart => true, | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
### puppet managed file | ||
# This file is part of systemd. | ||
# | ||
# systemd is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU Lesser General Public License as published by | ||
# the Free Software Foundation; either version 2.1 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# Entries in this file show the compile time defaults. | ||
# You can change settings by editing this file. | ||
# Defaults can be restored by simply deleting this file. | ||
# | ||
# See resolved.conf(5) for details | ||
<% if @dns.any? -%> | ||
DNS=<%= @dns.join(' ') %> | ||
<% end -%> | ||
<% if @fallback_dns.any? -%> | ||
FallbackDNS=<%= @fallback_dns.join(' ') %> | ||
<% end -%> | ||
#Domains= | ||
#LLMNR=no | ||
#MulticastDNS=no | ||
DNSSEC=<%= scope.function_bool2yesno([@dnssec]) %> | ||
Cache=<%= scope.function_bool2yesno([@cache]) %> | ||
DNSStubListener=<%= scope.function_bool2yesno([@dns_stub_listener]) %> |