---
packages:
system:
common:
- crudini
- dump
- duplicity
- git
- mdadm
- irssi
- lynx
- postfix
- powerline
- rsync
- tmux
- vim
Debian:
- ntp
Fedora:
- langpacks-en
- langpacks-nl
- livecd-tools
- rktime
- tmux-powerline
- tuned
- vim-powerline- block: - name: install ansible dependencies package: name={{ item }} state=present with_flattened: - "{{ packages.system.common }}" - "{{ packages.system.Fedora }}" - "{{ vars['packages.system.' + ansible_distribution] }}" when: ansible_distribution == "Fedora" tags: install_custom2TASK [common : install ansible dependencies] *******************************************************************************************
fatal: [host]: FAILED! => {"msg": "'dict object' has no attribute u'packages.system.Fedora'"}