I get this error when I use more than one target files.
And after changing the value or the comment in the last file (/etc/sysctl.d/90-kernel.conf).
Example code:
sysctl { 'net.ipv4.tcp_syncookies':
ensure => present,
value => '1',
comment => 'Turn on protection from Denial of Service (DOS) attacks',
target => '/etc/sysctl.d/90-net.conf',
}
sysctl { 'kernel.panic':
ensure => present,
value => '20',
comment => 'Automatic reboot 20 sec after kernel panic',
target => '/etc/sysctl.d/90-kernel.conf',
}
The first puppet agent run is going well. But after changing the code (value of kernel.panic changed from 20 into 30):
sysctl { 'net.ipv4.tcp_syncookies':
ensure => present,
value => '1',
comment => 'Turn on protection from Denial of Service (DOS) attacks',
target => '/etc/sysctl.d/90-net.conf',
}
sysctl { 'kernel.panic':
ensure => present,
value => '30',
comment => 'Automatic reboot 30 sec after kernel panic',
target => '/etc/sysctl.d/90-kernel.conf',
}
I get the messages:
Notice: /Stage[main]/Profile::Base::Cis/Sysctl[kernel.panic]/value: changed configuration value from '20' to '30' and live value from '20' to '30'
Notice: /Stage[main]/Profile::Base::Cis/Sysctl[kernel.panic]/comment: comment changed 'Automatic reboot 20 sec after kernel panic' to 'Automatic reboot 30 sec after kernel panic'
Error: /Stage[main]/Profile::Base::Cis/Sysctl[kernel.panic]: Could not evaluate: Failed to save Augeas tree to file. See debug logs for details.
It works only when I also chang the order from my code ( move the changing part to the top ) into:
sysctl { 'kernel.panic':
ensure => present,
value => '30',
comment => 'Automatic reboot 30 sec after kernel panic',
target => '/etc/sysctl.d/90-kernel.conf',
}
sysctl { 'net.ipv4.tcp_syncookies':
ensure => present,
value => '1',
comment => 'Turn on protection from Denial of Service (DOS) attacks',
target => '/etc/sysctl.d/90-net.conf',
}
Now the Puppet agent run is going well again:
Notice: /Stage[main]/Profile::Base::Cis/Sysctl[kernel.panic]/value: changed configuration value from '20' to '30'
Notice: /Stage[main]/Profile::Base::Cis/Sysctl[kernel.panic]/comment: comment changed 'Automatic reboot 20 sec after kernel panic' to 'Automatic reboot 30 sec after kernel panic'
Notice: Applied catalog in 9.14 seconds
I get this error when I use more than one target files.
And after changing the value or the comment in the last file (/etc/sysctl.d/90-kernel.conf).
Example code:
The first puppet agent run is going well. But after changing the code (value of kernel.panic changed from 20 into 30):
I get the messages:
It works only when I also chang the order from my code ( move the changing part to the top ) into:
Now the Puppet agent run is going well again: