модуля в таске?
что-то типа такого:
kafka_topics:
- name: topic1
partitions: 1
replication_factor: 2
options:
cleanup_policy: delete
- name: create topic(s)
kafka_lib:
resource: "topic"
api_version: "1.0.1"
name: "{{ item.name }}"
partitions: "{{ item.partitions }}"
replica_factor: "{{ item.replication_factor }}"
{% if item.options is defined %}
options:
cleanup.policy: "{{ item.options.cleanup_policy }}"
{% endif %}
state: "{{ item.state | default('present') }}"
zookeeper: "{{ zookeeper_hosts }}"
bootstrap_servers: "{{ kafka_hosts }}"
run_once: yes
with_items:
- "{{ kafka_topics }}"
https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#omitting-parameters
Так нельзя
Обсуждают сегодня