流浪汉:没有包装匹配' server.packages'是可用的(由可感知的生成)

时间:2016-12-21 10:45:08

标签: php windows vagrant ansible lampp

我正在使用Windows和hosts文件已更新。 有谁知道如何解决这个问题?

由于

1 个答案:

答案 0 :(得分:1)

生成的文件:/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

应该是

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

您可能必须修复/ansible/roles/php/tasks/main.yml

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

除了/ansible/vars/all.yml

php:
    install: '1'
    ppa: php
    packages: [php5-cli, php5-intl, php5-mcrypt, php5-curl, php5-mysql]

代替ppa: php5-5.6