I am a noob to bedrock and ansible.
I was able to get wp up using vagrant up originally. However, when I vagrant destroy the vm and then try to vagrant up again, and then visit the site at example.dev, I keep getting a database connection error.
When looking at the vm output in terminal, I see the following:
TASK: [wordpress-install | WP installed?] *************************************
failed: [default] => (item={'key': 'example.co', 'value': {'site_install': True, 'admin_user': 'admin', 'local_path': '../site', 'system_cron': True, 'repo': 'https://m33@bitbucket.org/example/a6-app.git', 'ssl': {'enabled': False}, 'multisite': {'enabled': True, 'subdomains': True}, 'site_title': 'exmaple Dev', 'admin_password': 'admin', 'env': {'db_name': 'a6_dev', 'wp_env': 'development', 'db_user': 'example_dbuser', 'db_password': 'example_dbpassword', 'wp_home': 'http://example.dev', 'wp_siteurl': 'http://example.dev/wp'}, 'site_hosts': ['example.dev'], 'admin_email': 'm33@example.dev'}}) => {"changed": true, "cmd": ["wp", "core", "is-installed", "--allow-root"], "delta": "0:00:00.924083", "end": "2015-05-14 16:41:02.733370", "item": {"key": "example.co", "value": {"admin_email": "m33@example.dev", "admin_password": "admin", "admin_user": "admin", "env": {"db_name": "a6_dev", "db_password": "example_dbpassword", "db_user": "example_dbuser", "wp_env": "development", "wp_home": "http://example.dev", "wp_siteurl": "http://example.dev/wp"}, "local_path": "../site", "multisite": {"enabled": true, "subdomains": true}, "repo": "https://m33@bitbucket.org/example/a6-app.git", "site_hosts": ["example.dev"], "site_install": true, "site_title": "example Dev", "ssl": {"enabled": false}, "system_cron": true}}, "rc": 1, "start": "2015-05-14 16:41:01.809287", "warnings": []}
stderr: PHP Warning: Unterminated comment starting line 16 in phar:///usr/bin/wp/php/wp-cli.php(23) : eval()'d code on line 16
WordPress database error Table 'a6_dev.wp_blogs' doesn't exist for query SELECT * FROM wp_blogs WHERE domain = 'example.dev' AND path = '/' made by include('phar:///usr/bin/wp/php/boot-phar.php'), include('phar:///usr/bin/wp/php/wp-cli.php'), require('phar:///usr/bin/wp/php/wp-settings-cli.php'), require('wp-includes/ms-settings.php'), get_site_by_path
PHP Notice: Undefined property: stdClass::$public in /srv/www/example.co/current/web/wp/wp-includes/ms-settings.php on line 184
Notice: Undefined property: stdClass::$public in /srv/www/example.co/current/web/wp/wp-includes/ms-settings.php on line 184
WordPress database error Table 'a6_dev.wp_sitemeta' doesn't exist for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'site_name' AND site_id = 1 made by include('phar:///usr/bin/wp/php/boot-phar.php'), include('phar:///usr/bin/wp/php/wp-cli.php'), require('phar:///usr/bin/wp/php/wp-settings-cli.php'), require('wp-includes/ms-settings.php'), get_site_option
WordPress database error Table 'a6_dev.wp_sitemeta' doesn't exist for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'siteurl' AND site_id = 1 made by include('phar:///usr/bin/wp/php/boot-phar.php'), include('phar:///usr/bin/wp/php/wp-cli.php'), require('phar:///usr/bin/wp/php/wp-settings-cli.php'), wp_cookie_constants, get_site_option
...ignoring
I read here that it may be related to using the same db user as I used on the original machine (I had changed all the db info originally) so I completely removed bedrock-ansible from my machine and recloned my bedrock git repository (just in case) and stuck with the default user for the db. However, that did not work either.
I assumed running vagrant destroy would completely obliterate the db as well as the vm but it looks like that could be wrong.
Sorry if this is bedrock 101. with such a new workflow, it’s hard to get to grips with the way everything works.
Let me know if you have any thoughts on the next step to take.