Hello Roots community.
Back again with another silly question. Thank you in advance for your time and support.
I have successfully installed WP using trellis / bedrock a number of times now, fixing various issues along the way, but I have run into an error that is stumping me on a fresh install. I have google foo-ed Trellis / Ansible / Vagrant to the best of my ability and appreciate any support you can provide.
I am running:
Host:
Windows 10
Vagrant 1.9.1
VirtualBox 5.1.12
vagrant-hostmanager
Development VM (Setup with Vagrant):
Ubuntu 16.04
Ansible 2.2.0.0
Remote Server:
Subdomain: “blog.example.com”
DreamCompute
Clean Ubuntu 16.04
Using the most recent versions of Trellis / Bedrock as of today (January 8, 2017).
Local Development setup goes smoothly, no issues.
The problems start when I try to provision the Remote Server.
So the following error initially pops up while running “ansible-playbook server.yml -e env=production” in the “Load Become Password” section:
Unexpected failure during module execution.
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: free variable ‘l_1_ansible_user’ referenced before assignment in enclosing scope
I verified that all of my variable settings were correct and messed around with everything I could think of. I can bypass that section by prompting for --ask-become-pass, but then I hit the exact same error again in the “Fail if root login will be disabled but admin_user will not be a sudoer” section.
If I permit logging in as root in the security.yml, its fails at the “Setup users” section with the same error. Running with -vvv gives me the following before the error:
Unexpected failure during module execution.
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/ansible/executor/task_executor.py”, line 91, in run
item_results = self._run_loop(items)
File “/usr/local/lib/python2.7/dist-packages/ansible/executor/task_executor.py”, line 274, in _run_loop
res = self._execute(variables=task_vars)
File “/usr/local/lib/python2.7/dist-packages/ansible/executor/task_executor.py”, line 431, in _execute
self._task.post_validate(templar=templar)
File “/usr/local/lib/python2.7/dist-packages/ansible/playbook/task.py”, line 248, in post_validate
super(Task, self).post_validate(templar)
File “/usr/local/lib/python2.7/dist-packages/ansible/playbook/base.py”, line 371, in post_validate
value = templar.template(getattr(self, name))
File “/usr/local/lib/python2.7/dist-packages/ansible/template/init.py”, line 359, in template
d[k] = self.template(variable[k], preserve_trailing_newlines=preserve_trailing_newlines, fail_on_undefined=fail_on_undefined, overrides=overrides)
File “/usr/local/lib/python2.7/dist-packages/ansible/template/init.py”, line 331, in template
result = self._do_template(variable, preserve_trailing_newlines=preserve_trailing_newlines, escape_backslashes=escape_backslashes, fail_on_undefined=fail_on_undefined, overrides=overrides)
File “/usr/local/lib/python2.7/dist-packages/ansible/template/init.py”, line 507, in _do_template
res = j2_concat(rf)
File “”, line 16, in root
File “/usr/local/lib/python2.7/dist-packages/jinja2/runtime.py”, line 358, in init
self._after = self._safe_next()
File “/usr/local/lib/python2.7/dist-packages/jinja2/runtime.py”, line 378, in _safe_next
return next(self._iterator)
File “”, line 16, in
NameError: free variable ‘l_1_item’ referenced before assignment in enclosing scope
fatal: [blog.example.com]: FAILED! => {
“failed”: true,
“stdout”: “”
}
to retry, use: --limit @/home/vagrant/trellis/server.retry
I have tried downgrading Ansible to 2.0.2.0 / changing various variable settings, but I am at a loss for my next steps. I can SSH into my remote server both using Putty and from the development VM itself, so I don’t think its an access issue.
I am sure this is something stupid on my end, but I am hitting the cap on my current experience and was hoping someone could point me in the right direction.
Thank you again for your time and effort!
P.S. Sorry if too much random information.