I am trying to call the same method "host_present" twice. But I am facing the following error
Parameter 'ensure' is already set on host_present[test] by # at /opt/puppetlabs/puppet/modules/manifests/host_1.pp:12; cannot redefine at /opt/puppetlabs/puppet/modules/manifests/host_1.pp:13 on node devopenstack
define host_present()
{
host { 'puppet_host':
persona => 'TEST',
url => 'https://user:password',
}
}
host_present{"test": ensure => present}
host_present["test"]{ ensure => absent}
Can someone help.