I downloaded the bedrock-ansible and bedrock repos into the following locations:
I followed the instructions from bedrock-ansible, set the vagrant file and group_vars and try to run ‘vagrant up.’ Everything works as supposed to, the machine boots, mounts shared folders, and then ttys to run provisioner: ansible and I receive the following error message:
The executable ‘ansible-playbook’ Vagrant is trying to run was not
found in the PATH variable. This is an error. Please verify
this software is installed and on the path.
I have tried every variation of adjusting the path:
ansible.playbook = './bedrock-ansible/site.yml’
ansible.playbook = './site.yml’
ansible.playbook = '…/bedrock-ansible/site.yml’
ansible.playbook = ‘…/site.yml’
I am assuming the error has something to do with my path. I made no adjustments to site.yml and have not moved it from the original location. Am I missing something?
That error message just means that the executable ansible-playbook couldn’t be found. Did you install Ansible first? If running ansible-playbook doesn’t work in your terminal, then it won’t work through Vagrant either.
I’m a little bit confused here–does this mean I can run multiple sites from a single Bedrock Ansible project simultaneously, like one would with MAMP and virtual hosts? If that’s the case, I may be missing something.
Setting up my group_vars/all file as instructed above works until Composer runs, which throws this error:
stdout: Composer could not find a composer.json file in /srv/www/example.dev/current
My Vagrantfile is pretty minimally modified:
config.vm.network :private_network, ip: '192.168.50.5'
# config.vm.hostname = 'example.dev' # This is taken care of via /group_vars/all, right?
# adjust paths relative to Vagrantfile
config.vm.synced_folder '../sites', '/srv/www', owner: 'vagrant', group: 'www-data', mount_options: ['dmode=776', 'fmode=775']
My impression was that the synced folder would be your/sites/dir instead of your/sites/dir/specificsite.dev. But it doesn’t look like Vagrant is seeing my development files at all. What am I doing wrong here?