Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assure app config initializers directory exists in redis task #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cih
Copy link

@cih cih commented Jan 21, 2016

Hey Folks,

Came across the following issue when provisioning a staging environment. Admittedly I am fairly new to both this tool (which is great btw!) and Ansible, but this adds a task that assures the directory exists before attempting to move the file across.

TASK [base : Configure redis-rb] ******************************************
fatal: [188.166.148.221]: FAILED! => {"changed": false, "failed": true, "msg": "Destination directory /rails_app/shared/config/initializers does not exist"} 

Hope this helps!

This avoids failure when attempting to move the `redis.rb`
file into the `{{ app_config_path }}/initializers` directory.
@a-chernykh
Copy link
Owner

Feels like we may need to revert 4e98d55 instead

a-chernykh added a commit that referenced this pull request Feb 1, 2016
Introduced in #35 and mentioned in #40
@a-chernykh
Copy link
Owner

I've just pushed 1.1.5 with the fix to this problem. Can you give me a favor and verify that this problem was fixed? You will need to re-download your box.

@cih
Copy link
Author

cih commented Feb 3, 2016

Sure I will give it a spin and let you know, thanks for the fix!

@cih
Copy link
Author

cih commented Feb 10, 2016

Sorry for the delay in getting back to you. I've just tested this out and I'm still seeing the same issue. I have included steps for reproduction including the server setup for completeness.

First up I create a DigitalOcean droplet (ubuntu 14.04.3) and add the user, sudo and ssh.

ssh root@serveriphere
adduser railsbox-testapp
visudo # railsbox-testapp ALL=(ALL) NOPASSWD: ALL
su railsbox-testapp
mkdir .ssh
chmod 700 .ssh
echo sshkeyhere > .ssh/authorized_keys
chmod 600 .ssh/authorized_keys

Then I clone down your test app locally and unzip the railsbox zip.

git clone git@github.com:andreychernih/railsbox-testapp.git
cd railsbox-testapp
cp ~/Downloads/railsbox-testapp-railsbox.zip .
unzip railsbox-testapp-railsbpx.zip

Update the group_vars in railsbox/ansible/group_vars/staging/config.yml to the following

---
rails_env: staging
target: server
vm_memory: 512
vm_swap: 512
vm_cores: 1
vm_share_type: nfs
vm_ip:
host: serverip
port: 22
username: railsbox-testapp

This fails for me at the same point as originally reported. Worth noting that running vagrant up in the development directory works fine. I've attached below the railsbox zip. Let me know if there is anything more I can do/provide?

Thanks!

railsbox-testapp-railsbox.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants