Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Add variable to use ansible in vm as a preference. #240

Conversation

joestewart
Copy link
Contributor

Adding a variable to use ansible installation in the vm even if ansible exists on the host.

It allows to set a variable in the config file to choose to run ansible in the vm.

# ansible installed in vm preferred
ansbile_in_vm_preferred: true

This should change nothing for existing installations and config files. Although the example config file could have the variable defined as false.

# ansible installed in vm preferred
ansbile_in_vm_preferred: false

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@geerlingguy
Copy link
Owner

@joestewart - What would be the use case for this? IMO, using Ansible inside the VM is a crutch/very non-ideal, and the only reason I added it was so Windows users could still use Drupal VM. Unlike Chef/Puppet/CF/etc., Ansible's major strength is that you don't need to kludge up your managed servers/VMs with anything extra for management.

I'd rather avoid adding another variable and extra logic to the Vagrantfile unless there's a very compelling reason to avoid using the already-installed copy of Ansible.

@joestewart
Copy link
Contributor Author

I understand. I didn't suggest it when the automatic check went in to see if I had much of a use case.

The first use case is selfish. To be able to test installation like the Windows users but on my machine without changing anything else.

The other was a support issue. I had a user with ansible problems on the host. There was an old version of ansible and a couple of related problems. This variable allows to use the vagrant box immediately and fix the ansible problem as time allowed.

One benefit of allowing install in the vm is the ease of getting new users up and running and no other host requirements.

@geerlingguy
Copy link
Owner

For the first use case, I often do the same, but I just go to the Vagrantfile and switch around the if condition so it runs the provisioner inside the VM regardless.

For the other use case, I'd rather still help the user to get onto the latest version of Ansible on the host, and fix problems there, because ideally, Drupal VM is a starting point for using Ansible to automate other infrastructure or local environments, not just Drupal VM. If someone wants to only use it for Drupal VM, then it might be better to uninstall Ansible entirely (or not install it in the first place).

The Quick Start Guide doesn't mention Ansible installation at all, except for faster setup/better overall experience. It's not a requirement :)

One benefit of allowing install in the vm is the ease of getting new users up and running and no other host requirements.

Exactly, and that's why it's not required on the host anymore as a result of #199

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

Successfully merging this pull request may close these issues.

None yet

2 participants