Ansible role that will install (& uninstall), configure and runs Besu: an enterprise Java Ethereum Client
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-role-besu/tasks/network.yml

21 lines
619 B

---
- name: Get the default ipv4 address - and set this as the default fallback
set_fact:
besu_host_ip: >-
{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] if
hostvars[inventory_hostname]['ansible_default_ipv4']['address'] is
defined else '127.0.0.1' }}
- name: Fetch public IP
uri:
url: http://ifconfig.me/ip
method: GET
return_content: yes
status_code: 200
register: besu_public_ip_output
ignore_errors: True
- name: Set the host ip
set_fact:
besu_host_ip: "{{ besu_public_ip_output.content }}"
when: besu_public_ip_output.status == 200