This commit sets the template-url to the pdk-templates repo and runs pdk convert to bring the module up to date
Merge pull request #192 from RandomNoun7/maint-update-pdk-template-url
(maint) Update pdk template
Merge pull request #191 from eimlav/modules-8148
(MODULES-8148) - Add SLES 15 support
(MAINT) Fix hand crafting the gemfile.
This change should mean that the next time pdk update is run the `if` block that loads the `bolt` and `beaker-task_helper` into `if` conditionals on their own lines. This way the `if` block doesn't have to be added to the Gemfile by hand after each update.
Merge pull request #193 from RandomNoun7/maint/master/Fix-Handcraftin…
…g-Gemfile (MAINT) Fix hand crafting the gemfile.
(MODULES-8456) Add spec_prep dependent task to beaker
The beaker acceptance tests require the test fixtures created by the spec_prep task. Unfortunately the beaker task cannot be modified directly. This commit dynamically inserts the spec_prep task as a dependency to the beaker task.
Merge pull request #196 from glennsarti/fix-beaker-task-dependency
(MODULES-8456) Add spec_prep dependent task to beaker
(FM-7693) Add Windows Server 2019
The reboot module now supports Windows Server 2019. This commit updates the metadata.json to show that Server 2019 is supported.
Merge pull request #197 from glennsarti/FM-7693-server2019
(FM-7693) Add Windows Server 2019
MODULES-8532 - pdksync_heads/master-0-g7281db5
Merge pull request #198 from puppetlabs/pdksync_pdksync_heads/master-…
…0-g7281db5 pdksync - MODULES-8532 - pdksync_heads/master-0-g7281db5
Merge pull request #199 from david22swan/FM-7724
(FM-7724) - Remove Windows 8 testing/support
Merge pull request #200 from puppetlabs/revert-199-FM-7724
Revert "(FM-7724) - Remove Windows 8 testing/support"
(BOLT-1057) Pass required args to run_task
Previously, the tests were omitting the `params` argument to `run_task`. In newer versions of BoltSpec, that parameter is going to be required, so now we always pass it.
Merge pull request #201 from puppetlabs/BOLT-1057-pass-required-args-…
…to-run-task (BOLT-1057) Pass required args to run_task
Prior to this change the unit tests for the reboot Bolt plan was not working properly. The broken tests were not noticed because the .travis.yml file was not configured to run the tests. This change ensures that the tests function properly and that Travis is properly configured to execute the tests on pull requests.
Merge pull request #204 from RandomNoun7/maint/master/fix-unit-tests
(MAINT) Fix Plan Unit Tests
Merge pull request #202 from HelenCampbell/boltfix
(MODULES-8717) Fix dependency issue on boltspec
MODULES-8726: Ensure sbin is in the path
The shutdown command is usually in /sbin or /usr/sbin. Many normal users don't already have them in their path. Running bolt task run reboot -n somenode --run-as root doesn't reboot the server, but does return a success. Add /usr/sbin and /sbin to the path in the nix.sh script
(MODULES-8718) Check for root or sudo in the nix.sh task
Since reboot task is running shutdown command on a nohup, if its run as a normal user it will silently fail. This commit will avoid that this error.
Merge pull request #203 from thilinapiy/check_root
[MODULES-8718] Check for root or sudo in the reboot task nix.sh script
(WIN-280) add skip() unless pattern to tests
Merge pull request #206 from ThoughtCrhyme/WIN-280
(WIN-280) add skip() unless pattern to tests
Merge pull request #205 from xalimar/include-sbin-in-path
MODULES-8726: Ensure sbin is in the path
Modify test helpers to use 'shutdown -c' for certain OS
These tests are failing however with the use of 'shutdown -c' to abort the shutdown, they pass successfully.
Merge pull request #207 from eimlav/fm-8051
(FM-8051) Add RedHat 8 support
Add additional guards for nix process detach
Observing some weird race-condition-y behaviors where the nix.sh script previously was not reliable in rebooting systems. Most of the time with an attached TTY, the subprocess was still being killed when the TTY-attached parent shell terminated. Adding a `sync` call seems to work around the problem. Adding an explicit `disown` for linux just for completeness. It was not shown to help with the observed race condition (which is resolved by `sync`). `disown` is a bash built-in, and this is a bash script so we should be fine to use it.
Merge pull request #210 from reidmv/fix-nix-reliability
Add additional guards for nix process detach
(maint) Handle an empty $nodes argument cleanly
Prior to this commit the reboot plan raised an error calling max() without a valid argument. This commit causes the plan to short-circuit and return an empty ResultSet in the event an empty TargetSpec was given as the $nodes argument. Long-term, the plan should probably be modified to always return a meaningful ResultSet value on completion.
(MODULES-9228) Return a ResultSet from reboot plan
Assuming some nodes successfully reboot and some nodes don't, when the reboot plan is invoked with _catch_errors => true, it should return meaningful data so that the end user can decide how to handle or report on which nodes failed to reboot while potentially continuing forward to another task with the set of nodes that succeeded. This commit makes the reboot plan always return meaningful data, even when erroring. Side note: gonna open a ticket to make it easier to _catch_errors for a plan, for the end user...
(MODULES-9228) Add fail_plan_on_errors flag
A common use case for using the reboot plan with _catch_errors => true would be to review which systems didn't reboot and remediate or move forwards only with those that did. However, even with _catch_errors => true, the caller has to check if the plan result is an error and go down a different code path if so to deal with it and extract the ResultSet they need. This commit provides a new Boolean plan option, fail_plan_on_error, which if set to false will ensure the plan always returns exactly the same data type regardless of whether or not any individual target failed to reboot. The consuming plan author can then simplify their own code, secure in the knowledge of what kind of data will be returned.
Fix missed fail_plan() and provide legacy return
This commit fixes a missed fail_plan() invocation that would have allowed a plan to fail even if fail_plan_on_errors was set to false. In doing so, it further linearizes the logic, allowing for a slight simplification of the main reduce function. While making the commit, it seemed like a good idea to restore the fail_plan() detail key that was used previously, in order to retain compatibility with previous failure return results. Clean up the spec test a bit while in here.
Merge pull request #209 from reidmv/fix-plan-return-value
Fix plan return value
Merge pull request #212 from ThoughtCrhyme/MAINT
(MAINT) Pdk update of reboot
(MAINT) pdk update for changelog generator
(MAINT) pdk update for changelog generator (#214)
(MAINT) pdk update for changelog generator
(MODULES-9510) Releaes prep for 2.2.0
Merge pull request #215 from ThoughtCrhyme/MODULES-9510
(MODULES-9510) Releaes prep for 2.2.0