While trying to install Trellis, I get an error from logrotate {{ ansible_user }}: 'ansible_user' is undefined
This is after all the other installing successful.
The only change I made to the default trellis 1.20.0 was in vagrant.default.yml vagrant_ansible_version: '2.10.17' [it was 2.10.7 but that wasn’t what got installed.
Didnt mention i am using Windows.
Really tried following the docs to the letter here.
Running vagrant up.
The docs say to treat all commands as WSL commands, however running trellis up or vagrant up inside the wsl complains about access to the host from VirtualBox it, and i did try to run down that rabbit hole.
You can manually apply those changes and let me know if it fixes it.
edit:
Here’s a brief explanation of what happened:
Trellis’ Vagrant integration tries to make getting started easier, so if no installation of Ansible is found on your host machine, Vagrant will use “local provisioning” where it will automatically install Ansibles on the Vagrant VM and run it all from the VM.
We recommend everyone uses trellis-cli because it handles dependency installation (including Ansible) on your host machine. If your project was created with trellis-cli, then Vagrant will recognize that Ansible exists and not use that local provisioning mode.
Since you did create your project with trellis-cli (on WSL I assume?) but then switched to Windows to run vagrant up (due to other issues), Ansible wouldn’t be found on the Windows side
This triggered that “local provisioning” mode I mentioned which exposed a bug.
Ideally you’re able to figure out the issues on WSL and use that for everything as recommended. Feel free to post a new thread with details on your WSL issues if you need help.
Thanks, good job!
I manually changed the files and now provision runs and completes.
Is it true the vagrant up and trellis up are mostly the same though? Or are the benefits to running trellis up - i mean mostly after the initial provisioning has run succefully.
I can defiantly do another WSL issue and explain it. see you there =]
trellis up just runs vagrant up under the hood so they’re basically the same. The trellis CLI command is mainly a convenience method since most commands that get run otherwise are with trellis.