-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Use ansible_local provisioner on all platforms #439
Comments
@QWp6t is way ahead of you! We've been waiting for this. We should go ahead and use it on all platforms. |
Yeah, I think there are a few hangups for Windows users, though. I'll revisit it and submit a PR when time permits (probably not until January). If someone else wants to tackle it before then, feel free. Just keep in mind that the trellis directory name can change, the Vagrantfile can be moved, and users can specify multiple site folders. (The first two we're aware of when in the Vagrantfile, but become less aware of inside the VM.) I'd really like to get @fullyint or @swalkinshaw to weigh in as well since they're our resident experts on all things related to Ansible. There are also some issues with Windows that I still want to tackle in Trellis, but I'll wait until after this transition before I bring them up. |
@austinpray I hope you mean all platforms as a fallback. It's still convenient to use the host Ansible as the primary provisioner. @geerlingguy also noticed that there are is a minor downside to the new ansible_local provisioner: Since it re-runs |
I personally think we should drop ansible provisioner and only use ansible_local. It's easier to maintain. |
@QWp6t - would be slightly easier, but for Ansible power users, it's a bit more painful, because you're requiring them to give up one of the major benefits of Ansible—not having to install extra junk inside your VM/servers. |
Also since Ansible on the host is a dependency anyway for the staging/production deployments. |
I haven't looked into it, but does using the ansible_local provisioner preclude one from running the server.yml playbook against hosts/development? I'm confused as to what we are losing if we switch to ansible_local for all platforms. |
@austinpray well correct. This only applies to Vagrant so it's development only. But consider this workflow:
This definitely simplifies things for development but might make it more confusing for remote servers. |
To avoid the issue that @swalkinshaw points out, it may be better to continue the current workflow where the user installs Ansible on their host machine during the setup process, but it could become an optional step for those who don't intend to deploy using Trellis. So, the pros of switching to the ansible_local provisioner exclusively:
The downsides are:
|
I disagree that it is making things more confusing for remote servers. The user needs to figure out how to install Ansible and run it locally at some point. Installing the dependencies is not the hurdle, it's understanding the ansible-playbook command and configuring the environment group_vars.
@joshrickert only the initial provisioning time will take a long time. If you are making config changes and testing locally you should be running |
You can have it both ways, of course (which is what I'm doing for Drupal VM):
If users install Ansible, it uses the |
@austinpray I'm in agreement that the improvement to the development workflow is worth it regardless. That's the first experience almost everyone has with Trellis anyway. @geerlingguy also a good idea 👍 |
Just wanted to drop a line here, since we were looking at using So you're not going to be able to switch until that all gets sorted :(. |
Vagrant's latest 1.8 release adds an ansible_local provisioner which should be able to replace the functionality of the windows provisioner shell script.
The text was updated successfully, but these errors were encountered: