tunapanda / provision

System for provisioning a new virtual machine with Tunapanda Edubuntu
7 stars 12 forks source link

Got "ERROR: cannot find role..." #22

Closed limikael closed 9 years ago

limikael commented 9 years ago

Hi,

I'm a nood at this, trying to learn... :) I was trying to follow the instructions, but got the following error... What am I doing wrong?

    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default: 
    default: Guest Additions Version: 4.2.0
    default: VirtualBox Version: 4.3
==> default: Mounting shared folders...
    default: /vagrant => /Users/mlindqvist/Documents/repo/provision
==> default: Running provisioner: ansible...
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --private-key=/Users/mlindqvist/Documents/repo/provision/.vagrant/machines/default/virtualbox/private_key --user=vagrant --connection=ssh --limit='default' --inventory-file=/Users/mlindqvist/Documents/repo/provision/.vagrant/provisioners/ansible/inventory --sudo -vvvv ansible/main.yml
ERROR: cannot find role in /Users/mlindqvist/Documents/repo/provision/ansible/roles/debops.dhcpd or /Users/mlindqvist/Documents/repo/provision/ansible/debops.dhcpd or /usr/local/etc/ansible/roles/debops.dhcpd
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
usernamenumber commented 9 years ago

You're probably not doing anything wrong. It looks like I neglected to include a dependency. One way you can address this in the short term is to run ansible-galaxy install debops.dhcpd (ansible-galaxy is the npm of ansible). I'll either figure out a way to automate installing dependencies in the future, or we may not need that particular role anyway.

...also, crap, apparently I accidentally merged some stuff from the unstable hackathon branch into master, probably during the rush at the end of the hackathon. :( All the more reason to spend some time this weekend getting things into shape. Thanks for the report!

limikael commented 9 years ago

Ok I'll wait for the dependency, build automation is like a drug for me and want that high feeling of seeing it in action...

With npm it is possible to have a package.json where dependencies are listed, and then you just type npm install inside the project folder and npm will automatically install all the dependencies for the project, this way it's possible to avoid checking dependencies into a repo, which makes updates of dependencies easier. Maybe there is something similar for ansible-galaxy? If there isn't there should be... :)

usernamenumber commented 9 years ago

Agreed! I've got to run to work, but if you find something in the mean time... ;)

On Fri, Dec 12, 2014 at 9:38 AM, limikael notifications@github.com wrote:

Ok I'll wait for the dependency, build automation is like a drug for me and want that high feeling of seeing it in action...

With npm it is possible to have a package.json where dependencies are listed, and then you just type npm install inside the project folder and npm will automatically install all the dependencies for the project, this way it's possible to avoid checking dependencies into a repo, which makes updates of dependencies easier. Maybe there is something similar for ansible-galaxy? If there isn't there should be... :)

— Reply to this email directly or view it on GitHub https://github.com/tunapanda/provision/issues/22#issuecomment-66779994.

limikael commented 9 years ago

Googled around a bit but didn't find anything.... :(

usernamenumber commented 9 years ago

Well, there's this, but probably better to just build any dependencies into provision.sh, either finding them dynamically or reading them from a separate file for maintainability. Or, probably better at least in the short term, add the roles we need to the repo as submodules.

That said, it's likely to be moot for now, as I think that's the only external role we have, and it doesn't exactly fit our use-case. I'm pretty sure I just installed it as a quick fix during the hackathon. Will research and fix, one way or another, this weekend.

usernamenumber commented 9 years ago

Going to close this issue for now:

  1. The playbooks currently in master no longer use any external playbooks
  2. The bootstrapping script can install dependencies if needed in the future
limikael commented 9 years ago

Ok I will try it again

limikael commented 9 years ago

Unfortunately I got another problem... :( https://github.com/tunapanda/provision/issues/31