diff --git a/group_vars/all.yml.example b/group_vars/all.yml.example index 323b1af..26201b2 100644 --- a/group_vars/all.yml.example +++ b/group_vars/all.yml.example @@ -49,6 +49,9 @@ become_method: sudo ##These variables are used in each role and usually propagated to the dependent roles. By default they are different for each role and it's highly recommended not to use single for multiple roles, escpecially when they are installed on the same machine. +#Should playbook install ufw firewall to the nodes or not. +install_firewall: true + #Which user will be used to connect to VMs ansible_user: ubuntu @@ -58,7 +61,7 @@ ansible_user: ubuntu # - name: "{{ username }}" #home: "/home/{{ username }}" -#Path to the public SSH key that will be installed to the service user +#Path to the public SSH key that will be installed to the service user. install_keys_to_service_user: true key_name: "id_rsa.pub" diff --git a/roles/bootnode/defaults/main.yml b/roles/bootnode/defaults/main.yml index 7e4cbd4..b224639 100644 --- a/roles/bootnode/defaults/main.yml +++ b/roles/bootnode/defaults/main.yml @@ -15,4 +15,6 @@ bootnode_archive: "off" bootnode_orchestrator: "off" parity_api: "off" -reboot_after_completion: false \ No newline at end of file +reboot_after_completion: false + +install_firewall: true \ No newline at end of file diff --git a/roles/explorer/defaults/main.yml b/roles/explorer/defaults/main.yml index 2ba341b..5efbdaa 100644 --- a/roles/explorer/defaults/main.yml +++ b/roles/explorer/defaults/main.yml @@ -19,4 +19,6 @@ MOC_ADDRESS: "0xdd0bb0e2a1594240fed0c2f2c17c1e9ab4f87126" explorer_version: "acee07c" -reboot_after_completion: false \ No newline at end of file +reboot_after_completion: false + +install_firewall: true \ No newline at end of file diff --git a/roles/explorer/tasks/main.yml b/roles/explorer/tasks/main.yml index c2f823c..e5f7289 100644 --- a/roles/explorer/tasks/main.yml +++ b/roles/explorer/tasks/main.yml @@ -40,7 +40,7 @@ - name: Setup ufw firewall import_tasks: ufw.yml - when: not ansible_bios_version is search("amazon") + when: install_firewall - name: restart machine after setup shell: shutdown -r 1 diff --git a/roles/moc/defaults/main.yml b/roles/moc/defaults/main.yml index 0106574..c1599c4 100644 --- a/roles/moc/defaults/main.yml +++ b/roles/moc/defaults/main.yml @@ -31,3 +31,6 @@ moc_archive: "off" reboot_after_completion: false +install_firewall: true + +terraform: false \ No newline at end of file diff --git a/roles/moc/tasks/main.yml b/roles/moc/tasks/main.yml index a7c98e7..37cb1d8 100644 --- a/roles/moc/tasks/main.yml +++ b/roles/moc/tasks/main.yml @@ -16,31 +16,36 @@ repo: "https://github.com/{{ MAIN_REPO_FETCH }}/poa-scripts-moc" dest: "{{ home }}/poa-scripts-moc" version: "{{ SCRIPTS_MOC_BRANCH }}" + when: terraform==false - name: Change owner and group of poa-scripts-moc file file: path={{ home }}/poa-scripts-moc owner={{ username }} group={{ username }} recurse=yes - + when: terraform==false + - name: install npm initial_keys_script npm: path: "{{ home }}/poa-scripts-moc" become: true become_user: "{{ username }}" + when: terraform==false - name: install npm generateInitialKey npm: path: "{{ home }}/poa-scripts-moc/generateInitialKey" become: true become_user: "{{ username }}" + when: terraform==false - name: install npm distributeTokens npm: path: "{{ home }}/poa-scripts-moc/distributeTokens" become: true become_user: "{{ username }}" + when: terraform==false - name: Setup ufw firewall import_tasks: ufw.yml - when: not ansible_bios_version is search("amazon") + when: install_firewall - name: restart machine after setup shell: shutdown -r 1 diff --git a/roles/netstat/defaults/main.yml b/roles/netstat/defaults/main.yml index 03b5628..44f5b3e 100644 --- a/roles/netstat/defaults/main.yml +++ b/roles/netstat/defaults/main.yml @@ -22,4 +22,6 @@ home: "/home/{{ username }}" nginx_headers: "off" PROXY_PORT: "3000" -reboot_after_completion: false \ No newline at end of file +reboot_after_completion: false + +install_firewall: true \ No newline at end of file diff --git a/roles/netstat/tasks/main.yml b/roles/netstat/tasks/main.yml index 9a46257..7492df6 100644 --- a/roles/netstat/tasks/main.yml +++ b/roles/netstat/tasks/main.yml @@ -46,7 +46,7 @@ - name: Setup ufw firewall import_tasks: ufw.yml - when: not ansible_bios_version is search("amazon") + when: install_firewall - name: restart machine after setup shell: shutdown -r 1 diff --git a/roles/validator/defaults/main.yml b/roles/validator/defaults/main.yml index 53d42e1..32fa58f 100644 --- a/roles/validator/defaults/main.yml +++ b/roles/validator/defaults/main.yml @@ -19,4 +19,6 @@ SCRIPTS_VALIDATOR_BRANCH: "mainnet" MAIN_REPO_FETCH: "poanetwork" BLK_GAS_LIMIT: "6700000" -reboot_after_completion: false \ No newline at end of file +reboot_after_completion: false + +install_firewall: true \ No newline at end of file diff --git a/roles/validator/tasks/main.yml b/roles/validator/tasks/main.yml index 008d041..073d56f 100644 --- a/roles/validator/tasks/main.yml +++ b/roles/validator/tasks/main.yml @@ -41,7 +41,7 @@ - name: Setup ufw firewall import_tasks: ufw.yml - when: not ansible_bios_version is search("amazon") + when: install_firewall - name: restart machine after setup shell: shutdown -r 1