valentinocossar / trellis-database-uploads-migration

Ansible playbook for Trellis that manages database and uploads migration.
MIT License
94 stars 13 forks source link

TASK [Abort if environment variable is equal to development] #14

Closed jturgeon-trovac closed 6 years ago

jturgeon-trovac commented 6 years ago

Hi, first thank you for this project, it is definitely a need for Roots workflow.

What is the current behavior? When I try to pull files from uploads folder in my development environment I get this error:

TASK [Abort if environment variable is equal to development] *** System info: Ansible 2.5.2; Darwin Trellis at "Support git url format ssh://user@host/path/to/repo"

ERROR: development is not a valid environment for this mode (you can't push/pull from development to development). fatal: [172.28.128.4]: FAILED! => {"changed": false} to retry, use: --limit @/Users/username/website.com/trellis/uploads.retry

What is the expected or desired behavior? To "pull" the files in a folder that I could take after to "push" to another environment.


Please describe your local environment:

Ansible version: 2.5.2 OS name and version: Mac OS 10.13 Trellis version: 1.0.0 rc2

Where did the bug happen? Development or remote servers? In my local computer for a request to the dev (VM)


Feature Request

I think maybe I misunderstood the explaination on how it is suppose to work, maybe a few example in the readme could help to understand how your tool works.

Please provide use cases for changing the current behavior:

I configure the host files like this:

development_host ansible_host=172.28.128.4 ansible_connection=ssh ansible_user=vagrant ansible_ssh_private_key_file=.vagrant/machines/default/virtualbox/private_key ansible_ssh_extra_args="-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null"

[development] development_host

[web] development_host


staging_host ansible_host=staging.website.com

[staging] your_server_hostname

[web] your_server_hostname


production_host ansible_host=xx.xxx.xxx.xxx (the ip address of the production server)

[production] production_host

[web] production_host


Maybe you can help me to understand what I missed. Thank you

jturgeon-trovac commented 6 years ago

Hi, after testing it, I find how to use it, maybe you could add to the documentation this precision: the push is for sending to the selected environment and the pull for receiving from it, because it is not so evident as first reading.

I put an example here for reference if someone else is lost like me:

replace by uploads.sh for files in uploads.