içeriyorsa Ansible bir görevi çalıştırın. Bu görevi yürütmek için başka bir yml
dosyası oluşturmak istemiyorum. Web sunucuları için zaten bir tane var, ama birkaç Perl sunucumuzun yüklenmesi için bazı web paketleri gerekiyor.Sadece ana makine adı bir dize
- name: Install Perl Modules
command: <command>
with_dict: perl_modules
- name: Install PHP Modules
command: <command>
with_dict: php_modules
when: <Install php modules only if hostname contains the word "batch">
Sunucu envanter dosyası
Aşağıda[webs]
web01
web02
web03
[perl]
perl01
perl02
perl03
perl-batch01
perl-batch02