我在主机上定义了一个用于挂载nfs共享的简单类,如下所示(当前)
class mounts { file { [ "/mnt/share","/mnt/share/share1" ]: ensure => 'directory',} mount { '/mnt/share/share1': ensure => 'mounted',device => '192.168.122.1:/home/export',dump => '0',fstype => 'nfs',options => 'vers=3,defaults',pass => '0',require => File[ "/mnt/share","/mnt/share/share1" ],} }
所以现在我在puppet客户端的/ etc / fstab中有一个条目
192.168.122.1:/home/export /mnt/share/share1 nfs vers=3,defaults 0 0
我的问题是,木偶类是以这种方式定义的(OLD)
class mounts { file { '/mnt/nfs': ensure => 'directory',} mount { '/mnt/nfs': ensure => 'mounted',require => File[ "/mnt/nfs" ],} }
现在我在/ etc / fstab中有两个条目
192.168.122.1:/home/export /mnt/nfs nfs vers=3,defaults 0 0 #OLD 192.168.122.1:/home/export /mnt/share/share1 nfs vers=3,defaults 0 0 #NEW
为什么木偶不会删除旧条目?