Closed thbar closed 6 years ago
PS: I'm not sure how to enrich the existing tests, by the way, because I didn't see where you'd place expectations after the run is complete. But happy to provide some tests if you give me more guidance though!
Hi Thibaut, thank you for thorough PR!
All the tests are in tests/test.yml
role, you can add your configuration option here: https://github.com/jnv/ansible-role-unattended-upgrades/blob/1517be5db2f3efdde8a790b7bf87bd941fbf6c57/tests/test.yml#L34-L38
And then you can check if it is properly configured here: https://github.com/jnv/ansible-role-unattended-upgrades/blob/1517be5db2f3efdde8a790b7bf87bd941fbf6c57/tests/test.yml#L57-L62
The role will check if the configuration option exists in the output of apt-config dump
command.
Hi @jnv! Thanks for the detailed guidelines, much appreciated.
I followed them, but apparently the test is failing for some reason at the moment.
I'll try dumping aptconfig.stdout
to see if anything clear comes out of this.
@jnv this is now fixed :smile: note that I'm not an expert with unattended-upgrades, and I didn't test that on the long run yet, so if you're used to manipulating that part of apt-config & see anything weird, please let me know!
@thbar Excellent, thank you! I will release this ASAP.
I had the need to ensure installation (& presumably, reboot) will only occur on a Saturday night, because Sunday is a "day off" for a specific client, which buys them some time to react in case of trouble at reboot (like happened recently on production instances).
I've followed the documentation at https://github.com/mvo5/unattended-upgrades.
Thanks for considering integrating this!