Chassis / puppet-wp

This module enables the easy use of WP CLI to control your WordPress site through Puppet manifests
https://chassis.github.io/puppet-wp/
GNU Lesser General Public License v3.0
44 stars 39 forks source link

Add support for Windows #141

Closed JohnEricson closed 3 years ago

JohnEricson commented 3 years ago

Hi @BronsonQuick! Here is the code change I talked with you about in issue #140. I've now added support for Windows as well, and I've tested it successfully on both Linux Ubuntu 18.04 and Windows Server 2016. I added a wp sh-script that runs the wp-cli.phar file. In that way it works more similar on both platforms, where in Windows the wp.bat file does the same thing. It shouldn't affect functionality from what I can see.

On Windows I set the default for the user that runs the exec to undef, as exec on Windows can't run commands as another user due to https://tickets.puppetlabs.com/browse/ENTERPRISE-13. I also added parameters so you can disable that the module ensures needed packages are installed, in case you want to manage them else where. The default is still that the module manages them if they are not previously managed.

I'd really appreciate to have this pull request merged to your repo. Let me know if you have any questions or suggestions on changes you wish to make. If this looks good I'd like to also implement support for using wp option patch in the module.

BronsonQuick commented 3 years ago

@JohnEricson Thanks again. Support for wp option patch would be fantastic too.

JohnEricson commented 3 years ago

Thanks @BronsonQuick! This is greatly appreciated! I'll let you know when I have a pull request for the wp option patch feature as well! 🙂