Hi

Stupid question :

  I have a module who install some file/directory. I pass a parameter
  "ensure" inside this module.

  I can do

    class my_module ($ensure ='present') {

      file { 'file0':
        ensure => $ensure
        etc.

      }

  so I can call my class with " ensure => 'absent' " to cleanup.

But I don't known how to do the same thing with directory. Is they are any
easy/clean way to do that ?

I know I can do something like

  if ensure = 'present'

  { file {'directory':} }
  else
  { exec {'rmdir directory'}}

But seem not very clean for me.

Regards.

JAS

--
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
lun 19 oct 2015 14:37:03 CEST

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/20151019124041.GA5260%40pcjas.obspm.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to