projects
/
chef.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e028853
)
Refetch final interface details before configuring netplan
author
Tom Hughes
<tom@compton.nu>
Wed, 27 Mar 2019 17:32:14 +0000
(17:32 +0000)
committer
Tom Hughes
<tom@compton.nu>
Wed, 27 Mar 2019 17:32:14 +0000
(17:32 +0000)
cookbooks/networking/recipes/default.rb
patch
|
blob
|
history
diff --git
a/cookbooks/networking/recipes/default.rb
b/cookbooks/networking/recipes/default.rb
index ae3a91d00b0e409573e93a473e74351bef021e9e..f6015a17eb6d692d460236569b68441edf3ca55f 100644
(file)
--- a/
cookbooks/networking/recipes/default.rb
+++ b/
cookbooks/networking/recipes/default.rb
@@
-50,6
+50,8
@@
node[:networking][:interfaces].each do |name, interface|
node.normal[:networking][:interfaces][name][:netmask] = (~IPAddr.new(interface[:address]).mask(0)).mask(prefix)
node.normal[:networking][:interfaces][name][:network] = IPAddr.new(interface[:address]).mask(prefix)
+ interface = node[:networking][:interfaces][name]
+
deviceplan = if interface[:interface] =~ /^(.*)\.(\d+)$/
netplan["network"]["vlans"][interface[:interface]] ||= {
"id" => Regexp.last_match(2).to_i,