I'm trying to do a loop in puppet, I put this code in manifests/site.pp
class ubuntu_fw {
ufw::allow { "allow-ssh-from-all":
port => 22,
}
$trustips = ["1.1.1.1", "2.2.2.2"]
$trustips.each |$trustip| {
ufw::allow { "allow-all-from-trusted-$trustip":
from => $trustip,
}
}
}
But i get this error
"Could not parse for environment production: Syntax error at '.'; expected '}' at /opt/puppet/manifests/site.pp:13"
Using puppet 3.4.3