{"action":"created","issue":{"url":"https://api.github.com/repos/roots/trellis/issues/314","labels_url":"https://api.github.com/repos/roots/trellis/issues/314/labels{/name}","comments_url":"https://api.github.com/repos/roots/trellis/issues/314/comments","events_url":"https://api.github.com/repos/roots/trellis/issues/314/events","html_url":"https://github.com/roots/trellis/pull/314","id":103394855,"number":314,"title":"Add ansible-ssh role to generate ssh config","user":{"login":"fullyint","id":7338513,"avatar_url":"https://avatars.githubusercontent.com/u/7338513?v=3","gravatar_id":"","url":"https://api.github.com/users/fullyint","html_url":"https://github.com/fullyint","followers_url":"https://api.github.com/users/fullyint/followers","following_url":"https://api.github.com/users/fullyint/following{/other_user}","gists_url":"https://api.github.com/users/fullyint/gists{/gist_id}","starred_url":"https://api.github.com/users/fullyint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fullyint/subscriptions","organizations_url":"https://api.github.com/users/fullyint/orgs","repos_url":"https://api.github.com/users/fullyint/repos","events_url":"https://api.github.com/users/fullyint/events{/privacy}","received_events_url":"https://api.github.com/users/fullyint/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-27T00:38:10Z","updated_at":"2015-08-28T02:35:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/roots/trellis/pulls/314","html_url":"https://github.com/roots/trellis/pull/314","diff_url":"https://github.com/roots/trellis/pull/314.diff","patch_url":"https://github.com/roots/trellis/pull/314.patch"},"body":"* Run `ansible-playbook dev.yml` without vagrant commands and without manually adding dev vm to ssh config. Grabs latest `vagrant ssh-config`, sorting out port forwarding between multiple VMs.\r\n* Pairs nicely with #313 to run cross-environment playbooks (syncing files/database), including dev.\r\n* Now you can use ssh config \"includes\". Files listed in `ssh_config_files` are `cat`-ed into `roles/ansible-ssh/files/config`.\r\n* Initial discussion in #288\r\n* #295 \"Dynamic development IP\" would be a really nice accompaniment\r\n\r\nCould someone test on Windows?\t\r\n* May have to adjust or comment out the `ssh_config_files` in `group_vars/all` (?)\r\n* The `vagrant ssh-config` command that runs would typically not be available when Windows users run `dev.yml` inside the vm. This gives return code 127, which I catch with `vagrant_ssh_config.rc == 127`, then set the `host` and `connection`, like in [`windows.sh`](https://github.com/roots/trellis/blob/8a84639257bdeaceb3b440823e2ac78c5c17906a/windows.sh#L39).\r\n* Are the parameters `--sudo --user=vagrant` necessary in `windows.sh`? They already exist in `dev.yml`.\r\n\r\n**Caution.** This refers to the vagrant vm as `vagrant-vm` in the hosts file. For consistency, this PR renames vagrant's reference to the vm from `default` to `vagrant-vm`. This latter means the Vagrantfile will stop working for existing VMs named `default`. Users would have to comment out the line\r\n```\r\nconfig.vm.define 'vagrant-vm'\r\n```\r\nand destroy the vm, then uncomment the line and `vagrant up`.\r\n\r\nWe don't have to rename the VM but it might be nice to have the names be consistent. Changing the name is a breaking change of sorts, but it seems better to do it now, while pre v1.0."},"comment":{"url":"https://api.github.com/repos/roots/trellis/issues/comments/135615637","html_url":"https://github.com/roots/trellis/pull/314#issuecomment-135615637","issue_url":"https://api.github.com/repos/roots/trellis/issues/314","id":135615637,"user":{"login":"austinpray","id":2192970,"avatar_url":"https://avatars.githubusercontent.com/u/2192970?v=3","gravatar_id":"","url":"https://api.github.com/users/austinpray","html_url":"https://github.com/austinpray","followers_url":"https://api.github.com/users/austinpray/followers","following_url":"https://api.github.com/users/austinpray/following{/other_user}","gists_url":"https://api.github.com/users/austinpray/gists{/gist_id}","starred_url":"https://api.github.com/users/austinpray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austinpray/subscriptions","organizations_url":"https://api.github.com/users/austinpray/orgs","repos_url":"https://api.github.com/users/austinpray/repos","events_url":"https://api.github.com/users/austinpray/events{/privacy}","received_events_url":"https://api.github.com/users/austinpray/received_events","type":"User","site_admin":false},"created_at":"2015-08-28T02:35:55Z","updated_at":"2015-08-28T02:35:55Z","body":">We don't have to rename the VM but it might be nice to have the names be consistent. Changing the name is a breaking change of sorts, but it seems better to do it now, while pre v1.0.\r\n\r\nI'm good with this, `vagrant-vm` makes much more sense as to what the name is actually for. `default` is incredibly cryptic.\r\n\r\nAlso more errors:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/2192970/9537850/55005f5a-4d03-11e5-8487-7c5b7a311ed2.png)\r\n\r\nThis is after `vagrant destroy -f && vagrant up`. Investigating."}}