i have this: --- - hosts: all vars: - site: "{{ ansible_hostname | regex_replace('^(.{2}).*' ,'\\1' ) }}" - datavg: DATAVG - datavgpvs: /dev/sdb - lv_int: - { lv: app, size: "{{appS}}", vg: "{{datavg}}", fs: xfs, mount: "/app" }
- hosts: - a become: yes become_method: sudo vars: - appS: 30G tasks: - name: Setup datavg LVs lvol: lv={{item.lv}} state=present vg={{datavg}} size={{item.size}} with_items: "{{ hostvars[all].lv_inst }}" but i have error in hostvars "' 'all' is undefined" -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e70ab19c-bd04-494c-bfca-887bfbb361dbn%40googlegroups.com.