Comments (23)
Before I forget, I also added a manifests/init.pp
, which seems quite essential:
class wp {
}
from puppet-wp.
[[Uncommenting]] Commenting the Package requirements in cli.pp seems to help:
# Package[ 'curl' ],
# Package[ "$phpprefix-cli" ],
# Package[ 'git' ]
Now I get this though:
err: /Stage[main]/Wp::Cli/Package[]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install ' returned : Reading package lists...
Building dependency tree...
Reading state information...
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::compare
notice: /Stage[main]//Node[myhost]/Wp::Site[/var/www/mydir]/Exec[wp install /var/www/mydir]: Dependency Package[] has failures: true
warning: /Stage[main]//Node[myhost]/Wp::Site[/var/www/mydir]/Exec[wp install /var/www/mydir]: Skipping because of failed dependencies
notice: Finished catalog run in 3.94 seconds
err: Failed to apply catalog: No title provided and "Package[]" is not a valid resource reference
from puppet-wp.
(All of this is on Ubuntu 12.04.3 LTS.)
from puppet-wp.
Before I forget, I also added a manifests/init.pp, which seems quite essential:
There should already be a manifests/init.pp
in puppet-wp?
Uncommenting the Package requirements in cli.pp seems to help:
There shouldn't be any commented requirements there?
from puppet-wp.
I meant commenting.
re init.pp, weird, I'll clone a clean repo now and see if there are any diffs.
from puppet-wp.
Fresh clone, master branch:
$ wc manifests/init.pp
0 0 0 manifests/init.pp
from puppet-wp.
Yep, it's intentionally blank (it doesn't need to do anything).
What's your full manifest file?
from puppet-wp.
The one for my host?
from puppet-wp.
Yeah, the one you're running puppet apply
on.
from puppet-wp.
import "basenode.pp"
node "myhost" inherits basenode {
include mysql::server
mysql::db { 'mysite':
user => 'mysite',
password => 'randomstuff',
}
# Setup the site
$wplocation = '/var/www/mysite'
notify {$wplocation:}
wp::site {$wplocation:
location => $wplocation,
url => 'http://mysite',
name => 'Mysite',
require => Mysql::Db['mysite']
}
}
I'll try to leave out the subclass stuff next. (once more, I'm really a puppet noob, someone helped me get started :)
from puppet-wp.
ah, it seems indeed that init.pp
can be empty, but then I should not use include wp
, which is also fine, that still leaves the command /usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install
without a package now.
from puppet-wp.
Ah, to avoid
Could not find dependency Package[] for Exec[wp-cli install] at /usr/local/teak-etc/etc/puppet/modules/wp/manifests/cli.pp:48
I only have to uncomment this:
# Package[ "$phpprefix-cli" ],
So I guess the $phpprefix-cli
variable is empty, possibly related to #9 and #12 :)
from puppet-wp.
Either my puppet parses $phpprefix-cli
as a complete variable or $phpprefix
is not set either. But adding this at line 12:
$phpprefix-cli = 'php5-cli'
takes a me step further!
from puppet-wp.
None of the package {}
lines should be commented, same for any of the Package[]
requirements. Doing so will break it.
I tested your configuration and it worked. What version of Puppet are you using?
from puppet-wp.
Default from Ubuntu 12.04.3 LTS
$ puppet --version
2.7.11
from puppet-wp.
$phpprefix
is set, so obviously it's just a problem with Puppet's parsing. Try upgrading to 2.7.19 (which is what I'm running) if you can, otherwise, change the $phpprefix-cli
line to ${phpprefix}-cli
from puppet-wp.
Yay, ${phpprefix}-cli
is much better!
Now I'm just left with:
err: /Stage[main]//Node[myhost]/Wp::Site[/var/www/mysite]/Exec[wp install /var/www/mysite]/returns: change from notrun to 0 failed: Working directory '/var/www/mysite' does not exist
from puppet-wp.
That's likely because the directory doesn't exist. :)
from puppet-wp.
BTW, I thought wp-cli or puppet-wp would take care of mkdir -p
for new sites. I'll add a feature request :)
from puppet-wp.
Nope; puppet-wp is only responsible for running the installation. Your WordPress installation should probably be managed as part of a code repository.
from puppet-wp.
See also #7.
from puppet-wp.
Ah, okay, cool, that clarifies things a bit. I think the current README.md misled me because of the wp::{option|rewrite|plugin}} stuff.
from puppet-wp.
That is: you can do it, but it's not a best practice. :)
from puppet-wp.
Related Issues (20)
- Add tests for `wp::cap`
- Add tests for `wp::cli`
- Add tests for `wp::command`
- Add tests for `wp::comment`
- Add tests for `wp::config`
- Add tests for `wp::core`
- Add tests for `wp::option`
- Add tests for `wp::params`
- Add tests for `wp::plugin`
- Add tests for `wp::rewrite`
- Add tests for `wp::role`
- Add tests for `wp::site`
- Add tests for `wp::theme`
- Add tests for `wp::user`
- Puppet Forge 1.1.1, 1.1.0 are...nothing? Empty? Just the manifest HOT 2
- I'm interested in implementing support for Windows HOT 3
- Update VuePress version
- Activate pre-installed plugins listed in `config(.local).yaml` HOT 1
- Potential security code smells HOT 1
- Update for Puppet 8.x
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-wp.