As of R10K 1.0.0 the purgedirs functionality and configuration options have been removed. This module continues to configure the no longer acknowledged configuration options. This commit removes support for the purgedirs configuration option.
add check to prevent the pe_version fact from being evaluated unless …
…the pe_gem provider is used. This prevents the puppet run from failing on foss puppet with strict variables enabled
change to use getvar to test for the existence of the pe_version fact…
… rather than test for pe_gem being specified as the the provider for the package
fix comment to reflect previous commit
change to only check the pe_version fact if the is_pe fact is 'true' …
…or true, to account for stringified facts, as the getvar() approach still throws an error under future parser and puppet 4 on the foss version.
fix test by setting is_pe fact to true
Add support for OpenBSD, some noteworthy points to mention:
- Tested with OpenBSD -current, where there is a r10k package available
- Ruby binaries on OpenBSD are prefixed with the Ruby version they are built
for, therefore r10k is called r10k21, since that is the version Puppet
and r10k relies on
- that would also be the case if r10k would be installed with the 'gem'
package provider
- the service name of mcollective is called 'mcollectived' on OpenBSD
Because of the last two mentioned points, added an osfamily dependent
r10k_binary variable, as well as making the mc_service_name variable
osfamily dependent too.
What I tested was managing the installation of package and configuration
file /etc/r10k.yaml as well as the prerun script added to /etc/puppet/puppet.conf
file. Pre-run script comes in handy, since my modules/hieradata is on
a ram disk, and on boot, it auto-fills itself before a first puppet agent
run on the master.
Not tested is the mcollective integration, since I first have to
clean up my messed up mcollective setup. That's something that
would come later.
Further added lots of specs tests with regard to OpenBSD. Didn't specified
a version, since the install via packages is only since AFTER OpenBSD 5.7,
so its 5.7-current, and I didn't really wanted to base specs on such a fragile
version number, so I better left it off.* Ruby 1.8.7 does not like the trailing ',' * Switch the path to ruby binary
If enable_ssl is false, the script still tries to read the public/private_key_path, and completely fails if the files are missing or invalid. This fixes the script to NOT pass those parameters (or try to read the files) unless enable_ssl is true. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
parameterize template arguments.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
command_prefix: Ability to run mco/r10k via sudo
It should be possible to run the webhook as an unprivileged user (eg nobody) and only invoke r10k/mco via sudo. sudoers examples: nobody ALL=(root) NOPASSWD: r10k deploy environment *, r10k deploy module * nobody ALL=(peadmin) NOPASSWD: mco r10k deploy *, mco r10k deploy_module * Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Merge pull request #163 from buzzdeee/master
Add support for OpenBSD, some noteworthy points to mention:
Merge pull request #170 from robbat2/master
Fix non-ssl, abilliy to customize templates, and run with less privileges (but call r10k/mco via sudo)
Add a Gentoo init script for webhook, based on the stock Gentoo init.…
…d template. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
start-stop-daemon says startas is deprecated.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Revert sysv init script to using pidfile.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Correctly status on Ubuntu with sysv.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Trailing commas accidently introduced caused arrays to be in the :SSL…
…VerifyClient parameter Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Merge pull request #172 from robbat2/gentoo
Gentoo & Pidfile/Init fixes
Merge branch 'master' of github.com:acidprime/r10k
Actually run as non-root, --user is for matching not chuid.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Merge pull request #173 from robbat2/gentoo
Actually run as non-root, --user is for matching not chuid.
Deprecates $git_ssl_verify parameter
* The parameter is `git_ssl_verify` b * But the value it's setting is the environment variable `GIT_SSL_NO_VERIFY` * So git_ssl_verify => 'true' is actually saying "Make sure SSL is not verified" * Better to rename it to `$git_no_ssl_verify` and add a deprecation to the old parameter * Followed by removal in a major bump Closes #165
Adds spec specific for $git_ssl_no_verify param
* Both checks are happy path for now * But in a major bump, $git_no_verify should either be removed as a parameter, or given a specific error to say "Don't use this anymore"
webhook: include mcollective optionally
When use_mcollective is set to false in the webhook.yaml, then avoid including the mcollective libraries
Move the $webhook::{user,group} definition to params.pp
Also, remove webhook::git_server as it seems useless
Add also service_{template,file} in webhook class declaration
Also, drop the webhook_ prefix
Remove the hardcoded hasstatus => false from the webhook service
The systemd unit files do have status
Merge pull request #175 from tampakrap/webhook_optional_require_mco
webhook: include mcollective optionally
Merge pull request #176 from tampakrap/webhook_suse_service
Use the webhook's systemd service file for openSUSE >= 12.1 and SLE12
Merge pull request #178 from tampakrap/webhook_remove_hardcoded_hasst…
…atus Remove the hardcoded hasstatus => false from the webhook service
Merge pull request #179 from tampakrap/webhook_init_suse
Add SUSE support in the webhook init file
Merge pull request #177 from tampakrap/webhook_user_group_params
Move the $webhook::{user,group} definition to params.ppMerge pull request #84 from trlinkin/no_more_purgedirs
[Deprecation] Remove purgedirs support
Conditionally install the webhook packages
Add a $manage_packages switch on the webhook class that enables the installation of the webhook needed packages. Move the installation of the packages to a r10k::webhook::package class The reason is that we can skip installing the gems, and instead install distro packages.
improve the webhook systemd unit file
- Type=forking as webrick fails to start otherwise - PIDFile=$pidfile otherwise it fails to auto-detect it, and fails to stop the service - Removing the rest of the variables as they are not really needed, or their default values are sufficient
Change the way the webhook logs the r10k deploy command
Previously, the r10k run was logged in a separate file. Thus, the webhook returned always success if the r10k itself failed for some reason to run properly. This resulted in getting false positives in the CI job. With this commit the r10k stdout and stderr is sent to the web server, so that we can get a proper failure message in the json output