I am provisioning a staging server for multisite and have never encountered this issue before. Running the provision with -vvvv does not reveal anything useful to me. I have tried using a fresh server, etc. but I cant seem to figure out whats causing this error.
AnsibleUndefinedVariable: 'generate_cert_ids' is undefined
SSL is set to false but I notice the provision chokes at
Is this a fresh clone of Trellis? Have you ever updated or attempted to merge an update with your copy of Trellis?
I ran into a Lets Encrypt issue the other day by recklessly copying my group_vars into a newer version of Trellis without looking at what’s changed in those files recently.
I suspect you’re using Ansible 2.0.2.0 and that the problem will no longer occur if you update to 2.1.1.0 or higher.
ansible --version
pip install --upgrade ansible
If for some reason you can’t upgrade Ansible, try running the playbook with the wordpress tag. That tag should cause a necessary additional task to run, enabling the wordpress role that failed before to succeed this time:
Trellis will need to bump the required Ansible version (already in the works) or create a specific fix for 2.0.2.0.
At first glance, I think the older vs newer versions of Ansible differ in how a role’s included task files are handled when a role is skipped altogether (e.g., the letsencrypt role in this case). I believe older Ansible doesn’t even see the included tasks, so any variables registered during those tasks are left undefined (you got the undefined error), whereas newer Ansible sees the tasks and defines the registered variables with “skipped” values.
I regret that I must have neglected to test the specific scenario (SSL false, Ansible 2.0.2.0, and no --tags) as I prepared roots/trellis#630 which introduced generate_cert_ids.
By removing lines 51-75 from my config I was able to get the server provisioned without error. However, I am now getting a huge error involving a WordPress database error. I have already tried reprovisioning everything, etc.
WordPress database error Table 'sitename_staging.wp_blogs' doesn't exist... and it goes on like that for about 30 lines. Any advice?
Deploy fails on TASK [deploy : WordPress Installed?]
@louisnovick@Jon
Thanks for reporting the original problem and that it persists despite updating Ansible.
I’d be curious to know what version of python you are running:
python --version
ansible --version
I’d also be curious to know whether the proposed fix in roots/trellis#753 resolves the issue for you. Of course, you would need to add back in lines 51-75 of wordpress-site.conf.j2 for the test to be meaningful.
If you have more trouble with that particular error message, search for threads related to multisite. Because it’s a new topic, start a new thread if you still want assistance.