I'd like to create a file, use it in a number of other puppetted processes,
then clean it up.
I can create it:
file { 'bash-agent-key' :
path => "/home/${user}/.bash_keyautoload.tmp",
content => template('ssh_agent_add/bash_keyautoload.erb'),
mode => 0700,
owner => $user,
group => $user,
}
but when I try to delete it with either:
file { 'bash-agent-key' :
ensure => absent,
}
or
file { 'bash-agent-key-delete' :
path => "/home/${user}/.bash_keyautoload.tmp",
ensure => absent,
}
I get an error message:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Duplicate declaration: File[bash-agent-key] is already declared in file
/etc/puppet/modules/ssh_agent_add/manifests/init.pp at line 47; cannot
redeclare on node
or
Error: Failed to apply catalog: Cannot alias File[bash-agent-key-delete] to
["/home/lightenn/.bash_keyautoload.tmp"] at
/etc/puppet/modules/ssh_agent_add/manifests/init.pp:73; resource ["File",
"/home/lightenn/.bash_keyautoload.tmp"] already declared at
/etc/puppet/modules/ssh_agent_add/manifests/init.pp:47
Any guidance much appreciated.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/7_kAU6lJTNQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.