Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken Ansible files #56

Merged
merged 4 commits into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
ansible_user: ubuntu
network: mainnet
node_type: sentry
bor_version: v0.3.0
bor_version: v0.3.3
heimdall_version: v0.3.0
3 changes: 1 addition & 2 deletions playbooks/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
become: yes

- name: remove installed binaries
ansible.builtin.shell:
cmd: apt remove bor bor-profile heimdalld heimdalld-profile -y
shell: apt remove bor bor-profile heimdalld heimdalld-profile -y
become: true

3 changes: 1 addition & 2 deletions playbooks/network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
hosts: all
tasks:
- name: update permission for home
ansible.builtin.shell:
cmd: chmod 755 {{ ansible_env.HOME }}/
shell: chmod 755 {{ ansible_env.HOME }}/
become: true

- name: Install Dependencies
Expand Down
17 changes: 7 additions & 10 deletions roles/install-bor/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,24 @@
# tasks file for bor

- name: install bor pacakges and bor profile
ansible.builtin.shell:
cmd: curl -L https://raw.githubusercontent.com/maticnetwork/install/main/bor.sh | bash -s -- {{ bor_version }} {{ network }} {{ node_type }}
shell: curl -L https://raw.githubusercontent.com/maticnetwork/install/main/bor.sh | bash -s -- {{ bor_version }} {{ network }} {{ node_type }}
become: true

- name: uncomment p2p discovery
ansible.builtin.command:
cmd: sudo sed -i 's|.*\[p2p.discovery\]| \[p2p.discovery\] |g' /var/lib/bor/config.toml
shell: sed -i 's|.*\[p2p.discovery\]| \[p2p.discovery\] |g' /var/lib/bor/config.toml
become: true

- name: make bor the user of data directory
ansible.builtin.command:
cmd: chown bor /var/lib/bor
shell: chown bor /var/lib/bor
become: true

- name: add mainnet bootnodes
ansible.builtin.command:
cmd: sed -i 's|.*bootnodes =.*| bootnodes = ["enode://0cb82b395094ee4a2915e9714894627de9ed8498fb881cec6db7c65e8b9a5bd7f2f25cc84e71e89d0947e51c76e85d0847de848c7782b13c0255247a6758178c@44.232.55.71:30303,enode://88116f4295f5a31538ae409e4d44ad40d22e44ee9342869e7d68bdec55b0f83c1530355ce8b41fbec0928a7d75a5745d528450d30aec92066ab6ba1ee351d710@159.203.9.164:30303","enode://4be7248c3a12c5f95d4ef5fff37f7c44ad1072fdb59701b2e5987c5f3846ef448ce7eabc941c5575b13db0fb016552c1fa5cca0dda1a8008cf6d63874c0f3eb7@3.93.224.197:30303","enode://32dd20eaf75513cf84ffc9940972ab17a62e88ea753b0780ea5eca9f40f9254064dacb99508337043d944c2a41b561a17deaad45c53ea0be02663e55e6a302b2@3.212.183.151:30303"]|g' /var/lib/bor/config.toml
shell: sed -i 's|.*bootnodes =.*| bootnodes = ["enode://0cb82b395094ee4a2915e9714894627de9ed8498fb881cec6db7c65e8b9a5bd7f2f25cc84e71e89d0947e51c76e85d0847de848c7782b13c0255247a6758178c@44.232.55.71:30303","enode://88116f4295f5a31538ae409e4d44ad40d22e44ee9342869e7d68bdec55b0f83c1530355ce8b41fbec0928a7d75a5745d528450d30aec92066ab6ba1ee351d710@159.203.9.164:30303","enode://4be7248c3a12c5f95d4ef5fff37f7c44ad1072fdb59701b2e5987c5f3846ef448ce7eabc941c5575b13db0fb016552c1fa5cca0dda1a8008cf6d63874c0f3eb7@3.93.224.197:30303","enode://32dd20eaf75513cf84ffc9940972ab17a62e88ea753b0780ea5eca9f40f9254064dacb99508337043d944c2a41b561a17deaad45c53ea0be02663e55e6a302b2@3.212.183.151:30303"]|g' /var/lib/bor/config.toml
when: network == "mainnet"
become: true

- name: add mumbai bootnodes
ansible.builtin.command:
cmd: sed -i 's|.*bootnodes =.*| bootnodes = ["enode://320553cda00dfc003f499a3ce9598029f364fbb3ed1222fdc20a94d97dcc4d8ba0cd0bfa996579dcc6d17a534741fb0a5da303a90579431259150de66b597251@54.147.31.250:30303","enode://f0f48a8781629f95ff02606081e6e43e4aebd503f3d07fc931fad7dd5ca1ba52bd849a6f6c3be0e375cf13c9ae04d859c4a9ae3546dc8ed4f10aa5dbb47d4998@34.226.134.117:30303"]|g' /var/lib/bor/config.toml
shell: sed -i 's|.*bootnodes =.*| bootnodes = ["enode://320553cda00dfc003f499a3ce9598029f364fbb3ed1222fdc20a94d97dcc4d8ba0cd0bfa996579dcc6d17a534741fb0a5da303a90579431259150de66b597251@54.147.31.250:30303","enode://f0f48a8781629f95ff02606081e6e43e4aebd503f3d07fc931fad7dd5ca1ba52bd849a6f6c3be0e375cf13c9ae04d859c4a9ae3546dc8ed4f10aa5dbb47d4998@34.226.134.117:30303"]|g' /var/lib/bor/config.toml
when: network == "mumbai"
become: true

10 changes: 4 additions & 6 deletions roles/install-heimdall/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
# tasks file for heimdall

- name: install heimdall pacakges and heimdall profile
ansible.builtin.shell:
cmd: curl -L https://raw.githubusercontent.com/maticnetwork/install/main/heimdall.sh | bash -s -- {{ heimdall_version }} {{ network }} {{ node_type }}
shell: curl -L https://raw.githubusercontent.com/maticnetwork/install/main/heimdall.sh | bash -s -- {{ heimdall_version }} {{ network }} {{ node_type }}
become: true

- name: Setup Mainnet Heimdall Seeds
ansible.builtin.command:
cmd: sed -i 's|^seeds =.*|seeds = "[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"|g' /var/lib/heimdall/config/config.toml
shell: sed -i 's|^seeds =.*|seeds = "[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"|g' /var/lib/heimdall/config/config.toml
when: network == "mainnet"
become: true

- name: Setup Mumbai Heimdall Seeds
ansible.builtin.command:
cmd: sed -i 's|^seeds =.*|seeds = "[email protected]:26656,[email protected]:26656,[email protected]:26656"|g' /var/lib/heimdall/config/config.toml
shell: sed -i 's|^seeds =.*|seeds = "[email protected]:26656,[email protected]:26656,[email protected]:26656"|g' /var/lib/heimdall/config/config.toml
when: network == "mumbai"
become: true

Expand Down