Ansible NTP error

Hello!

I’m running Bedrock with Ansible deploys in Windows 8.1.
I used this example of Vagrantfile and windows.sh

When I use command vagrant up I see this error

==> default: ERROR: cannot find role in /vagrant/roles/ntp or /vagrant/ntp or /etc/ansible/roles/ntp

I saw this guide to make bedrock-ansible work in Windows and made changes to my files according to it.

My folder structure is
– example.dev/
---- bedrock/
---- ansible/

What am I doing wrong?

@tanzoor I’m guessing you used the windows.sh script at the first link you listed, vs. the more up-to-date windows.sh at the project root which installs the galaxy roles listed in requirements.yml (including the ntp role mentioned in the error message). Try this latter script, if you haven’t already.

2 Likes

@fullyint, thank you for your reply!

I copied this part

if [ ! -d /vagrant/${ANSIBLE_PATH}/vendor ]; then
  echo "Running Ansible Galaxy install"
  ansible-galaxy install -r /vagrant/${ANSIBLE_PATH}/requirements.yml -p /vagrant/${ANSIBLE_PATH}/vendor/roles
fi

to my windows.sh file, but now I have new error, which is described in this issue. Solution is to get update of Ansible, but I can’t do it in Windows.

My requirements.yml file is exact as this from repo.

I’d suggest using (or adapting) the entire updated windows.sh. For example, it would install the latest ansible for you from the ansible/ansible ppa (1.9.2 at time of this writing), whereas the out-of-date windows.sh installs ansible from the rquillo/ansible ppa, which is still back on ansible v1.7.1.

If for some reason you must stay with ansible pre-v1.8, you can switch the formatting in the requirements file back to the txt format that preceded the yml format (see discussion here). You’d also rename your requirements.yml to requirements.txt and adjust the corresponding references in windows.sh.

Note that the requirements file you linked omits the swapfile role that appears in the latest requirements file and server.yml playbook. Maybe that is your intention.

2 Likes

Thank you for your help, I used original Vagrantfile and windows.sh and vagrant up executed with no errors!

1 Like