Skip to content

Instantly share code, notes, and snippets.

@yudaykiran
Created May 1, 2017 17:12
Show Gist options
  • Save yudaykiran/dfc4cc8b726fa58daf6bafa9d9f9f839 to your computer and use it in GitHub Desktop.
Save yudaykiran/dfc4cc8b726fa58daf6bafa9d9f9f839 to your computer and use it in GitHub Desktop.
roles/first/tasks/main.yml
- name: Update Target Portal
set_fact:
target_portal: "{{result.stdout}}"
delegate_to: "{{hostvars[groups['master'][0]]['ansible_ssh_host']}}"
roles/second/tasks/main.yml
- name: Establish ISCSI Connection
open_iscsi:
show_nodes: yes
portal: "{{hostvars[groups['master'][0]]['target_portal']}}"
discover: yes
login: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment