Created
August 16, 2016 16:31
-
-
Save natalia-chikina/1b347e8856045abe024a1082b3cea3da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Configure iptables for Master | |
user: root | |
hosts: "{{spark_master_group_name}}" | |
sudo: yes | |
vars_files: | |
- ../vars/network-vars.yml | |
- ../vars/spark-vars.yml | |
tasks: | |
- name: Add rule to firewall for all ports | |
iptables: chain=INPUT in_interface=eth1 source={{hostvars[item][ip_interface]['ipv4']['address']}} jump=ACCEPT | |
with_items: "{{ groups[spark_cluster ~ 'spark_master'] | union(groups['inventorycalc_' ~ spark_cluster ~ '_node']) | union(groups[spark_cluster ~ 'spark_master']) }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment