Error: Could not get 'template_root' option. Does it exist?

When trying to deploy again, I get two errors at this point:

TASK [deploy : Get WP theme template and stylesheet roots] *********************
System info:
  Ansible 2.4.1.0; Darwin
  Trellis at "Bump Ansible `version_tested_max` to 2.4.3.0"

Error: Could not get 'template_root' option. Does it exist?
Error: Could not get 'stylesheet_root' option. Does it exist?

What could be the reason?
I have removed the template directory mu plugin.

Hopefully the update in roots/trellis#948 will resolve this.

So updating to the newest trellis version will solve it?

“Hopefully the update in roots/trellis#9483 will resolve this.”

Please try that and let us know.

I updated trellis. Reprovisioning worked. When trying to deploy, I get this now:
non-zero return code
Sorry, user web is not allowed to execute ‘/usr/sbin/service php7.2-fpm
reload’ as root on mymachinename

I have resolved this error now too, after reading through this post: Deployment issues with php-fpm

The wrong php-fpm version was specified in my /etc/sudoers.d/web-services file. I changed it from 7.1 to 7.2 and it worked

3 Likes

Thank you for reporting that /etc/sudoers.d/web-services file adjustment. I would have expected it to have adjusted to php 7.2 during your provisioning. Was your recent Trellis update complete with adjusting web_sudoers to use php 7.2? I know sometimes people forget to update group_vars files.

Be sure web_sudoers lists php 7.2. Otherwise your next provisioning could change your /etc/sudoers.d/web-services back to php 7.1.

2 Likes

Ah, that was the problem. Thank you for your help.

2 Likes