我正在尝试从库存组创建主机列表到ansible任务
- name: perform on one node
command: /opt/vertica/sbin/install_vertica --hosts {{ node_list }} --rpm /tmp/vertica_7.1.x.x86_64.RHEL5.rpm --dba-user mydba
delegate_to: "{{ groups['vertica'][0] }}"
在此,我想在node_list
groups['vertica']
作为主持人列表
谁知道怎么做?
由于
答案 0 :(得分:0)
有以下工作
- name: perform on one node
command: /opt/vertica/sbin/install_vertica -s {{ groups['vertica'] | join(',') }} -r {{ download_dir }}/vertica-{{ vertica_version }}.x86_64.RHEL5.rpm -u mydba
delegate_to: "{{ groups['vertica'][0] }}"