Multisite subsite using TwentyFifteen theme

I’ve encountered the same problem as @allurewebsolutions after successfully installing Multisite (thanks again, @fullyint).

I have a fresh clone of Trellis and Bedrock. I’ve tried out the changes in PR 848 and in PR 854 too (a regex seems to be the difference). So I’ve actually replaced finalize_after.yml with this, but unfortunately it did not solve the issue, I get the error messages when visiting the site:

The theme directory "twentyseventeen" does not exist.
ERROR: The themes directory is either empty or doesn’t exist. Please check your installation.

Although when I just visit the admin area, that fixes the problem instantly, and the default twentyseventeen theme works again on the sites.

Even with -vvv, nothing happens at the “Update WP theme paths” task, nothing can be seen in the output, it’s empty. For the task “Get WP theme template and stylesheet roots” I get this (and after that the empty task result can be seen too):

TASK [deploy : Get WP theme template and stylesheet roots] *****************************************************
task path: /home/vagrant/trellis/roles/deploy/hooks/finalize-after.yml:14
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/commands/command.py
<sitename.tld> ESTABLISH SSH CONNECTION FOR USER: web
<sitename.tld> SSH: EXEC ssh -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/f59e68137f sitename.tld '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"''
<sitename.tld> (0, '\n{"changed": true, "end": "2017-09-17 02:36:49.358077", "stdout": "http://sitename.tld/wp/ \\nhttp://sub1.sitename.tld/wp/ ", "cmd": " wp site list --field=url | xargs -I {} bash -c \'export url=\\"{}\\"; echo -n \\"$url \\" && wp option get template_root --skip-plugins --url=$url || echo\'\\n ", "rc": 0, "start": "2017-09-17 02:36:48.377430", "stderr": "", "delta": "0:00:00.980647", "invocation": {"module_args": {"warn": true, "executable": null, "chdir": "/srv/www/sitename.tld/current", "_raw_params": " wp site list --field=url | xargs -I {} bash -c \'export url=\\"{}\\"; echo -n \\"$url \\" && wp option get template_root --skip-plugins --url=$url || echo\'\\n ", "removes": null, "creates": null, "_uses_shell": true}}, "warnings": []}\n', '')
ok: [sitename.tld] => (item=template_root) => {
    "changed": false,
    "cmd": " wp site list --field=url | xargs -I {} bash -c 'export url=\"{}\"; echo -n \"$url \" && wp option get template_root --skip-plugins --url=$url || echo'\n ",
    "delta": "0:00:00.980647",
    "end": "2017-09-17 02:36:49.358077",
    "failed": false,
    "failed_when_result": false,
    "invocation": {
        "module_args": {
            "_raw_params": " wp site list --field=url | xargs -I {} bash -c 'export url=\"{}\"; echo -n \"$url \" && wp option get template_root --skip-plugins --url=$url || echo'\n ",
            "_uses_shell": true,
            "chdir": "/srv/www/sitename.tld/current",
            "creates": null,
            "executable": null,
            "removes": null,
            "warn": true
        }
    },
    "item": "template_root",
    "rc": 0,
    "start": "2017-09-17 02:36:48.377430",
    "stderr": "",
    "stderr_lines": [],
    "stdout": "http://sitename.tld/wp/ \nhttp://sub1.sitename.tld/wp/ ",
    "stdout_lines": [
        "http://sitename.tld/wp/ ",
        "http://sub1.sitename.tld/wp/ "
    ]
}
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/commands/command.py
<sitename.tld> ESTABLISH SSH CONNECTION FOR USER: web
<sitename.tld> SSH: EXEC ssh -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/f59e68137f sitename.tld '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"''
<sitename.tld> (0, '\n{"changed": true, "end": "2017-09-17 02:36:50.565836", "stdout": "http://sitename.tld/wp/ \\nhttp://sub1.sitename.tld/wp/ ", "cmd": " wp site list --field=url | xargs -I {} bash -c \'export url=\\"{}\\"; echo -n \\"$url \\" && wp option get stylesheet_root --skip-plugins --url=$url || echo\'\\n ", "rc": 0, "start": "2017-09-17 02:36:49.640575", "stderr": "", "delta": "0:00:00.925261", "invocation": {"module_args": {"warn": true, "executable": null, "chdir": "/srv/www/sitename.tld/current", "_raw_params": " wp site list --field=url | xargs -I {} bash -c \'export url=\\"{}\\"; echo -n \\"$url \\" && wp option get stylesheet_root --skip-plugins --url=$url || echo\'\\n ", "removes": null, "creates": null, "_uses_shell": true}}, "warnings": []}\n', '')
ok: [sitename.tld] => (item=stylesheet_root) => {
    "changed": false,
    "cmd": " wp site list --field=url | xargs -I {} bash -c 'export url=\"{}\"; echo -n \"$url \" && wp option get stylesheet_root --skip-plugins --url=$url || echo'\n ",
    "delta": "0:00:00.925261",
    "end": "2017-09-17 02:36:50.565836",
    "failed": false,
    "failed_when_result": false,
    "invocation": {
        "module_args": {
            "_raw_params": " wp site list --field=url | xargs -I {} bash -c 'export url=\"{}\"; echo -n \"$url \" && wp option get stylesheet_root --skip-plugins --url=$url || echo'\n ",
            "_uses_shell": true,
            "chdir": "/srv/www/sitename.tld/current",
            "creates": null,
            "executable": null,
            "removes": null,
            "warn": true
        }
    },
    "item": "stylesheet_root",
    "rc": 0,
    "start": "2017-09-17 02:36:49.640575",
    "stderr": "",
    "stderr_lines": [],
    "stdout": "http://sitename.tld/wp/ \nhttp://sub1.sitename.tld/wp/ ",
    "stdout_lines": [
        "http://sitename.tld/wp/ ",
        "http://sub1.sitename.tld/wp/ "
    ]
}

TASK [deploy : Update WP theme paths] **************************************************************************
task path: /home/vagrant/trellis/roles/deploy/hooks/finalize-after.yml:31

TASK [deploy : Reload php-fpm] *********************************************************************************

What am I doing wrong?