GithubHelp home page GithubHelp logo

chassis / puppet-wp Goto Github PK

View Code? Open in Web Editor NEW
44.0 6.0 39.0 3.7 MB

This module enables the easy use of WP CLI to control your WordPress site through Puppet manifests

Home Page: https://chassis.github.io/puppet-wp/

License: GNU Lesser General Public License v3.0

Puppet 78.94% Ruby 20.18% HTML 0.37% Shell 0.51%
puppet puppet-forge wordpress wp-cli chassis

puppet-wp's Introduction

Puppet WP-CLI

This module enables the easy use of WP CLI to control your WordPress site through Puppet manifests. It provides an easy abstraction for common WP CLI commands as well as installing the WP CLI binaries as needed.

Documentation

Detailed documentation is available on Github Pages.

puppet-wp's People

Contributors

benpriestman avatar bronsonquick avatar danielbachhuber avatar dependabot[bot] avatar im-bpriestman avatar jconroy avatar johnericson avatar joshbetz avatar rmccue avatar traviscibot avatar zamoose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

puppet-wp's Issues

Install plugins without activating

Currently you can't:

  • Install a plugin without activating it
  • Install/Activate a plugin without trying to activate it on each subsequent provision

Add `--no-140chars-check` to linting

A carriage return that was added during my linting fixes breaks the install command with the following error: missing --admin_user parameter (The name of the admin user.)

Update docs on docs

We're currently missing a cd docs list item and also some documentation about the automatic deployment.

Add user.pp

Pretty straightforward:

It would be cool to be able to add/remove users like:

wp::user { 'josh': ensure => present }
wp::user { 'admin': ensure => absent }

Start adding tests for Puppet WP

Given all the new features I've been adding it's definitely worth investigating adding unit tests to ensure forwards and backwards compatibility and to avoid manual testing.

Refactor the plugin command and parameters

An issue was reported in my Debugging extension for Chassis: Chassis/phpMyAdmin#8 (comment) where the plugins are always activated even if they are installed and activated.

We should rework the functionality to check for this correctly and also add in the ability to install plugins at a version number and also allow deletions of plugins.

I'll whip up a PR for this additional functionality.

Fix unless in plugin.pp

Error: Parameter unless failed on Exec[/vagrant wp plugin plugin install query-monitor --activate ]: 'plugin is-installed query-monitor' is not qualified and no path was specified. Please qualify the command or specify a path. at /vagrant/puppet/modules/wp/manifests/command.pp:18

Download url

Howdy fellas,

Not sure if I'm just "doing it wrong" (highly likely) but I've got an issue where if use puppet-wp with the current wpcli download url i.e.

https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

located here: https://github.com/rmccue/puppet-wp/blob/master/manifests/cli.pp#L23

I get the following error

http://cl.ly/image/0C1e3G31312u

But if I change it to

https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

It all works fine.

Just a heads up. As above - I could just be doing it wrong.

Update the Travis deployment

vuejs/vuepress#1826 was merged upstream but there was some good feedback on a better way to deploy the updates. I'll update our deployment here and test the results then open an issue and make a PR upstream afterwards.

Add wp::user class

This should accept the following attributes: create, delete, update, set-role, generate, add-cap, add-role, meta (add, delete, patch, update), remove-cap and remove-role.

Add ability to generate wp-config.php

At the moment, a wp-config.php has to be included in the files rather than being able to get generated by the module. This means we have to handle creation of this externally with a template, whereas it should be built into the module.

Could not find dependency Mysql::Db[store] for Wp::Site

I'm pretty new to puppet. So I'm a bit confused by this error message:

Could not find dependency Mysql::Db[store] for Wp::Site[/mydir] at etc/puppet/manifests/myhost.pp:25

I simply copied and adapted what I found in README.md

   require => Mysql::Db['store']

wrong user in wp::plugin

ubuntu : 14.04
puppet : 3.4.3
vagrant (on the host) : 1.5.4

I'm using puppet-wp inside a Vagrant provisioner. I downloaded it from the git repository.

Main issue:
wp::plugin is unable to install any plugin. The exec "wp install plugin $title" inside the "ensure" case runs with 'root' as user: "wp plugin install" doesn't like it and does nothing, without throwing any error.
Then the final "wp plugin activate" does throw an error as it can't find the plugin.
Adding a "user => $::wp::user," with the exec "wp install plugin $title" makes everybody (almost) happy...

Secondary issue:
With the above change, when the user is not the default one (i.e. www-data), the plugin is not installed. But then there is no error at all. The configuration is achieved with success. Even with the puppet debug option, there is no good clue. Not even the "Warning: Could not create directory." usually thrown by the command "wp plugin install".

Add better documentation

The readme covers a few of the classes but we are probably better off creating more through documentation.

Add a better`wp::site` class

Add activate, archive, create, deactivate, delete, empty, option, meta, switch-language and unarchive support to start with.

php-cli dependency fail despite it being available

The following prevents me from creating any sites (or working with puppet-wp at all)

if ! defined(Package["$phpprefix-cli"]) {
    package { "$phpprefix-cli":
        ensure => installed,
    }
}

My rpm -q php-cli
php-cli-5.3.3-27.el6_5.x86_64

Php installed using example42/php from puppetforge. Manual 'php' command-line executions work just fine. Manually installed wp-cli and all its functionalities are in tact. Any ideas?

Change wp::site to wp::core

WP-CLI has commands for both wp core and wp site. Currently the naming of wp::site is confusing and it should be changed to wp::core and later on we can add the wp site command in the wp::site class.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.