|
|
|
---
|
|
|
|
- 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 orion_version is not set when fast sync is enabled
|
|
|
|
fail:
|
|
|
|
msg: Orion and Fast-Sync are incompatible
|
|
|
|
when: orion_version is defined 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"
|