Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vagrant up : No package matching 'server.packages' is available #292

Open
dumindu opened this issue Dec 21, 2016 · 7 comments
Open

vagrant up : No package matching 'server.packages' is available #292

dumindu opened this issue Dec 21, 2016 · 7 comments
Assignees

Comments

@dumindu
Copy link

dumindu commented Dec 21, 2016

I am using windows and hosts file has been updated. Anything has to be changed?

@dumindu
Copy link
Author

dumindu commented Dec 22, 2016

generated file: /ansible/roles/server/tasks/main.yml

- name: Install Extra Packages
  sudo: yes
  apt: pkg={{ item }} state=latest
  with_items: server.packages
  when: server.packages is defined

should have to be

- name: Install Extra Packages
  sudo: yes
  apt: pkg={{ item }} state=latest
  with_items: "{{ server.packages }}"
  when: server.packages is defined

@floodedcodeboy
Copy link

This is a duplicate of #274

@toby-griffiths
Copy link
Contributor

@dumindu you can fix this by replacing the following line in ansible/roles/server/tasks/main.yml...

Before...

- name: Install Extra Packages
  sudo: yes
  apt: pkg={{ item }} state=latest
  with_items: server.packages           <=== Replace this line...
  when: server.packages is defined

After...

- name: Install Extra Packages
  sudo: yes
  apt: pkg={{ item }} state=latest
  with_items: "{{ server.packages }}"     <=== ... with this line
  when: server.packages is defined

@toby-griffiths
Copy link
Contributor

I've tried to find "server.packages" in the repo, so that I can submit a PR, but can't find it. Can anyone shed some light?

@InFog
Copy link
Contributor

InFog commented May 14, 2017

Thank you all for the thread. I'm a bit away from the project lately but I want to make the project active again.

@toby-griffiths, did you also check the roles under? https://github.com/phansible If I can correctly remember this is where the roles come from.

@toby-griffiths
Copy link
Contributor

toby-griffiths commented Jun 5, 2017 via email

@debo
Copy link
Member

debo commented Mar 16, 2018

@toby-griffiths sorry for the very late reply. The issue is caused by me pretending to be smart and ansible trying to be as safe as possible.

Phansible generated vars wipe entirely the default one belonging to the roles instead of merging with them. It's an intended behaviour so I will need to move the default vars to be in the snake case format instead of the dotted one or use the combine filter when processing them. It will all come as part of the next development iteration.

@debo debo self-assigned this Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants