Skip to content
Snippets Groups Projects
Commit 574cd711 authored by Ty Hahn's avatar Ty Hahn
Browse files

Allow substring hostname

Let's say the current hostname is 'aaabbbccc'. The current module won't
allow you to change to, for instance, 'aaabbb' since it can grep
'aaabbb' from 'aaabbbccc'.
parent 8c93a324
Branches
No related tags found
No related merge requests found
......@@ -358,7 +358,7 @@ class network (
'7','8': {
exec { 'sethostname':
command => "/usr/bin/hostnamectl set-hostname ${manage_hostname}",
unless => "/usr/bin/hostnamectl status | grep 'Static hostname: ${manage_hostname}'",
unless => "/usr/bin/hostnamectl status | grep 'Static hostname: ${manage_hostname}$'",
}
}
default: {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment