I am using a third party yaml file to load in php packages (the yaml file can't really change) using a prefix on apt.
# doesn't work
- name: PHP | MAIN | Install php packages - intl1
apt: >
pkg=php5-{{ item }}
state=latest
with_items:
- cli
- intl
- mcrypt
- curl
sudo: yes
# error
failed: [localhost] => (item=cli,intl,mcrypt,curl) => {"failed": true, "item": "cli,intl,mcrypt,curl"}
msg: No package matching 'intl' is available
# works
- name: PHP | MAIN | Install php packages - intl2
apt: >
pkg=php5-{{ item }}
state=latest
with_items:
- intl
- mcrypt
- curl
sudo: yes
# in a perfect world (works)
- name: PHP | MAIN | Install php packages - intl3
apt: >
pkg={{ item }}
state=latest
with_items: - php5-cli
- php5-intl
- php5-mcrypt
- php5-curl
sudo: yes
This looks related to: https://github.com/ansible/ansible/commit/7ac5e462efbc850dd39ce5746accf3012530ed98