drupal-6


switch chef-client user during bootstrap


I've written a recipe to install Aegir. I would like to bootstrap a new instance on aws with aegir recipe, The installation goes well but fails to execute "drush hostmaster-install" as it throws "Drupal installation not found" error.
It installs smoothly When i manually go into machine and have a chef-client run with aegir user.
ssh to ec2 with ubuntu user
sudo su - aegir
sudo chef-client
But the installation is getting failed when i bootstrap new instance with ubuntu user. I appreciate any idea's of switching users to run chef client.
execute "apt-get-update" do
command "sudo apt-get update"
end
%w{curl apache2 php5 libapache2-mod-php5 openssl php-pear php5-cli php5-common php5-curl php5-dev php5-gd php5-imagick
php5-imap php5-intl php5-mcrypt php5-memcache php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-tidy php5-gd
php5-xmlrpc php5-xsl apache2-utils postfix rsync sudo libcurl3 libcurl3-gnutls mysql-client mysql-common}.each do |x|
package x do
action :install
end
end
user "aegir" do
action :create
supports :manage_home => true
comment "aegir User"
home "#{node[:aegir][:dir]}"
shell "/bin/bash"
password "VenEucAf1"
end
group "www-data" do
action :modify
members "aegir"
append true
end
bash "install_mysql" do
user "root"
code /etc/sudoers.d/aegir
chmod 440 /etc/sudoers.d/aegir
EOH
not_if { ::File.exists?("/etc/sudoers.d/aegir") }
end
bash "Install_drush" do
user "root"
cwd "/var/aegir"
code '/var/aegir', 'USER' => 'aegir' })
cwd "#{node[:aegir][:dir]}"
command true, :restart => true, :reload => true
action :start
end
Updated my complete recipe.
Error: User aegir does not exists
Sounds like you might need to set the HOME environment variable. You can add it to the execute resource:
execute 'drush hostmaster-install' do
user 'aegir'
environment 'HOME' => '/home/whatever'
end

Related Links

Drupal 6 - creating full page content with no sidebars within
Node save with multiple taxonomy field of different vocabulary in drupal 6
Hybridauth module social network icons not working with user/register page drupal 6
Is there a way to make an online customer tax exempt?
How to put two form elements in a row using Drupal Form API?
Increase memory_limit of subdomains in the plesk panel
Cart items missing after login, drupal6 with ubercart
How to disable “Read more” link in product description? (ubercart, drupal6)
How to configure site created in drupal on some other machine to be run on localhost of another machine
How to have different style files in multilingual website using Drupal 6?
scrollable views in drupal 6 is needed
hook_comment is not working for update operation in drupal
Drupal 6 - Image gallery image popup when navigating site?
How to put two cck fields in add content page in drupal 6
drupal block variable_set not saving select value
Drupal 6 Form “Radio” #return_value Not Working

Categories

HOME
pandas
clips
azure-data-factory
pycharm
office365api
routes
razor
umd
pivotal-cloud-foundry
node-notifier
vault
tomcat6
user-input
apache-cayenne
spring-tool-suite
hex-editors
decimal
quartz-scheduler
worldwind
undefined
database-replication
functional-testing
tar
css-animations
dynamic-featured-image
user-interaction
pingfederate
gsmcomm
nouislider
sql-server-2012-express
karaf
phpfreechat
http-referer
hockeyapp
occlusion
code-search-engine
c11
twitch
opshub
sas-visual-analytics
gulp-sourcemaps
dynamic-reports
texmaker
jvm-languages
eigenvalue
cubic-spline
apache-fop
clean-architecture
blogengine.net
pebble-watch
lowpass-filter
ifs
qtwebview
titanium-android
webdriverjs
angular-strap
removechild
log4c
prettytensor
make-install
nessus
ionic
remobjects
rake-task
jscript.net
tablelayout
cctv
java-metro-framework
dml
rebol3
valuechangelistener
flexmojos
page-layout
web2py-modules
eclipse-memory-analyzer
padarn
smtp-auth
kyotocabinet
pvrtc
pysimplesoap
ocx
netbeans-6.9
semantic-diff
netdna-api
eclipse-templates
qt-jambi
locate
gallio
gamma
forums
pascal-fc
spec#
windows-live-messenger

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App