Issue #140: Drush aliases inside parrot.#141
Conversation
| owner => 'root', | ||
| group => 'root', | ||
| content => template('parrot_drush/php/drush_alias.erb'), | ||
| #require => File['/home/vagrant/.drush'], |
There was a problem hiding this comment.
I commented out the two require statements here, because they failed for me. Do we really need to require them?
There was a problem hiding this comment.
Yeah, you'll need them, in case the '/home/vagrant/.drush' directory doesn't exist.
This will need to be declared created somewhere else in the Puppet manifests though.
There was a problem hiding this comment.
done this, thanks 👍
There was a problem hiding this comment.
(now actually fixed, oops!)
|
|
||
| file {"/home/vagrant/.drush/$name.aliases.drushrc.php": | ||
| ensure => $ensure, | ||
| owner => 'root', |
There was a problem hiding this comment.
Presumably the owner and group should be vagrant if these aliases are for the vagrant user.
There was a problem hiding this comment.
@darthsteven you mentioned the www-data user on #140 (comment) , but when might that user need drush aliases? The only time I've ever wanted aliases for a user in parrot is just for the regular vagrant user, simply because that's the user I happen to get logged in as when running parrot ssh. Is it better to be running drush commands as a different user anyway, e.g. www-data?
So I'm also not sure we actually want aliases for the root user either.
There was a problem hiding this comment.
(Meanwhile, I've now fixed the owner & group for the vagrant user's alias.)
Fix owner & group of vagrant user’s alias file too.
Oops, totally hadn’t tested the previous commit.
| { | ||
|
|
||
| # Create home directories for the users that will be using Drush. | ||
| file { '/home/vagrant/.drush': |
There was a problem hiding this comment.
This will die if there are two drush aliases, as you can't manage the same resource twice.
There was a problem hiding this comment.
You need to factor this out into a class, and then include that class (you can include it as many times as you like).
There was a problem hiding this comment.
Ah yeah, I totally fixed that but forgot to push. I may not have moved it to the best place though, I just put it in the first thing up the 'call stack' that wasn't per-site.
For #140.