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/main.yml

52 lines
1.6 KiB

---
- name: Ensure we have sane configuration
block:
- name: Check besu_version is correct
fail:
msg: You must set "besu_version" for this role to run when not building Besu from source
when: besu_version is not defined and not besu_build_from_source
- name: Check besu_version is not set when besu_build_from_source is set
fail:
msg: >-
The vars "besu_version" and "besu_build_from_source" are
incompatible. If trying to build a specific git refspec, use
"besu_git_refspec" instead of besu_version.
when: besu_version is defined and besu_build_from_source
- name: Check besu_privacy_enabled is not set when fast sync is enabled
fail:
msg: Orion and Fast-Sync are incompatible
when: ( besu_privacy_enabled|bool == True ) and ( besu_sync_mode == "FAST" )
- name: Include OS and distribution specific variables
include_vars: "{{ item }}"
with_first_found:
- files:
- "{{ ansible_distribution|lower }}.yml"
- "{{ ansible_os_family|lower }}.yml"
skip: true
- name: Compile besu
include_tasks: "compile.yml"
when: besu_build_from_source
- name: Install besu
include_tasks: "install.yml"
- name: Run OS specific installation tasks
include_tasks: "{{ item }}"
with_first_found:
- files:
- "{{ ansible_distribution|lower }}/install.yml"
- "{{ ansible_os_family|lower }}/install.yml"
skip: true
- name: Get IP address to bind to if not provided
include_tasks: "network.yml"
when: not besu_host_ip
- name: Create config
include_tasks: "config.yml"
- name: Create Besu service
include_tasks: "service.yml"