You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scenario: Initial puppet run. None of the files exist
Expected result: Both files are created
# puppet apply test.pp
Notice: Compiled catalog for myserver in environment production in 0.53 seconds
Notice: /Stage[main]/Main/Node[default]/File[/tmp/file1]/ensure: created
Notice: /Stage[main]/Main/Node[default]/Exec[/tmp/file2]/returns: executed successfully
Notice: /Stage[main]/Main/Node[default]/Exec[/tmp/file2]: Triggered 'refresh' from 1 events
Notice: Finished catalog run in 0.33 seconds
# ls -l
total 12
-rw-r--r--. 1 root root 5 Apr 4 13:18 file1
-rw-r--r--. 1 root root 5 Apr 4 13:18 file2
-rw-r--r--. 1 lburiola lburiola 250 Apr 4 13:17 test.pp
# cat file1 file2
test
test
TEST 2
scenario: Second puppet run. Both files already exist
Expected result: Nothing happens
# puppet apply test.pp
Notice: Compiled catalog for myserver in environment production in 0.52 seconds
Notice: Finished catalog run in 0.28 seconds
TEST 3
scenario: file1 needs to be modified. file2 already on disk
expected result: file1 is modified. file2 is recreated
# echo foo > file1
# puppet apply test.pp
Notice: Compiled catalog for myserver in environment production in 0.52 seconds
Notice: /Stage[main]/Main/Node[default]/File[/tmp/file1]/content: content changed '{md5}d3b07384d113edec49eaa6238ad5ff00' to '{md5}d8e8fca2dc0f896fd7cb4cb0031ba249'
Notice: /Stage[main]/Main/Node[default]/Exec[/tmp/file2]: Triggered 'refresh' from 1 events
Notice: Finished catalog run in 0.29 seconds
TEST 4
scenario: file1 exists. file2 doesn't exist.
expected result: file2 is created
# rm -f file2
# puppet apply test.pp
Notice: Compiled catalog for myserver in environment production in 0.55 seconds
Notice: /Stage[main]/Main/Node[default]/Exec[/tmp/file2]/returns: executed successfully
Notice: Finished catalog run in 0.30 seconds
The text was updated successfully, but these errors were encountered:
gburiola
pushed a commit
to gburiola/puppet-postfix
that referenced
this issue
Apr 4, 2017
PROBLEM
If
${postfixdir}/${title}.db
is deleted after it has been created, it will never be created again, unless${postfixdir}/${title}
is refreshed.There's also another scenario where a
.db
won't ever be created. For example:/etc/postfix/sasl_passwd
and schedules exec/usr/sbin/postmap /etc/postfix/sasl_passwd
/usr/sbin/postmap /etc/postfix/sasl_passwd
and createssasl_passwd.db
If puppet fails on step 2 above, then the
.db
file will never be created.Exemple of problem:
SOLUTION
Remove
refreshonly => true,
and addcreates => "${postfixdir}/${title}.db",
TEST SCRIPT
TEST 1
scenario: Initial puppet run. None of the files exist
Expected result: Both files are created
TEST 2
scenario: Second puppet run. Both files already exist
Expected result: Nothing happens
TEST 3
scenario: file1 needs to be modified. file2 already on disk
expected result: file1 is modified. file2 is recreated
TEST 4
scenario: file1 exists. file2 doesn't exist.
expected result: file2 is created
The text was updated successfully, but these errors were encountered: