valentinocossar / trellis-database-uploads-migration

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

Ansible error #1

Closed 7hr1LL closed 7 years ago

7hr1LL commented 7 years ago

Hey @valentinocossar, thanks for this plugin. Following the installation instructions I always run into this error.

ERROR! Attempted to read "/Users/myusername/Sites/myproject.com/trellis/hosts/development" as YAML: 'AnsibleUnicode' object has no attribute 'keys' Attempted to read "/Users/myusername/Sites/myproject.com/trellis/hosts/development" as ini file: /Users/myusername/Sites/myproject.com/trellis/hosts/development:44: Expected key=value host variable assignment, got: 192.168.50.5

Do you have any idea how to fix it?

Best regards, ThriLL^

valentinocossar commented 7 years ago

Hi, thank you for trying this tool. To help me to debug, I have to know which OS (and version) are you using and which version of Trellis are you using. Thank you. 🙂

7hr1LL commented 7 years ago

Hey Valentino,

thanks for the fast reply.

Im running OS X El Capitan (10.11.6) Trellis 0.9.9

running vagrant ssh-config brings up:

MacBook-Pro-2:trellis $ vagrant ssh-config
Host default
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /Users/myusername/Sites/myproject.com/trellis/.vagrant/machines/default/virtualbox/private_key
  IdentitiesOnly yes
  LogLevel FATAL
  ForwardAgent yes

thanks a lot!

valentinocossar commented 7 years ago

Same for me:

Host default
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /Users/myusername/Projects/myproject/_trellis-myproject.com/.vagrant/machines/default/virtualbox/private_key
  IdentitiesOnly yes
  LogLevel FATAL
  ForwardAgent yes

I'm using Trellis 0.9.6 (without the ".canonical" in the variables url_from and url_to) and Ansible 2.0.2.0 on macOS 10.12.5. Which version of Ansible do you use?

valentinocossar commented 7 years ago

Also, I've just updated the README.md because there was an error with the ansible_host in the hosts configurations. Could you retry with this little fix?

7hr1LL commented 7 years ago

ansible 2.3.0.0. i will check with your version. can you ssh into vagrant using ssh vagrant@yourproject.dev? I think thats my issue.

7hr1LL commented 7 years ago

@valentinocossar yeah the issue was ssh agent forwarding for dev. As soon as this was set correct i could login into the machine using vagrant@myproject.dev

later the script run an error that a folder was missing. After I've created it manually a db backup (dev) was possible.

thanks for the assistance and the plugin!

7hr1LL commented 7 years ago

db backup works and creates the files in the folders.

a db push from local to prod runs fine but nothing gets exchanged. same goes for db pull from production to local - no errors in terminal, everything goes smooth but nothing is in fact exchanged. any ideas?

valentinocossar commented 7 years ago

@ThriLLzd sorry for all the inconveniences.

  1. No, I can't login into my local vagrant with vagrant@myproject.dev, but I can do that with the command vagrant ssh.
  2. As reported above, I updated all hosts configurations in the README, did you update these in your Trellis project?

I've tested this tool with two different Macs, both with macOS 10.12.5, Trellis 0.9.9 (and also 0.9.6 with some adjustments) and Ansible 2.0.2.0, I still have to test it with Ansible 2.3.0.0.

Let me know if something changes, meanwhile I try to test it with Ansible 2.3.0.0.

valentinocossar commented 7 years ago

Maybe this is related to #3? Let me know, thank you.