fix up ansible-lint warnings (#15)

Signed-off-by: Ben Burns <803016+benjamincburns@users.noreply.github.com>
pull/16/head
Benjamin Burns 5 years ago committed by GitHub
parent 1ebaf3850c
commit 4c9ec434cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      meta/main.yml
  2. 7
      tasks/compile.yml
  3. 14
      tasks/main.yml
  4. 5
      tasks/network.yml

@ -1,6 +1,6 @@
---
galaxy_info:
author: PegaSysEng
author: PegaSysEng
role_name: hyperledger-besu
description: Besu is an open-source java enterprise ethereum client
company: PegaSysEng

@ -8,12 +8,13 @@
- name: Check JDK version
shell: javac -version | egrep -o '[0-9]+\.[0-9]+\.[0-9]+'
register: jdk_version
changed_when: false
ignore_errors: true
- name: Ensure JDK is installed
fail:
msg: "You must have JDK 11 or later installed. {{ 'No version found.' if jdk_version is failed else 'Found version ' + jdk_version.stdout }}"
when: jdk_version.stdout is version('11.0.0', '<')
when: jdk_version.stdout is version('11.0.0', '<')
- name: Clone Besu Sources
git:
@ -22,15 +23,17 @@
version: "{{ besu_git_commit }}"
- name: Build Besu
shell: ./gradlew --no-daemon --parallel clean assemble
command: ./gradlew --no-daemon --parallel clean assemble
args:
chdir: /tmp/besu
changed_when: true
- name: Get Besu Version
shell: "awk '/version=/ { gsub(/version=/,\"\"); print $1 }' gradle.properties"
args:
chdir: /tmp/besu
register: besu_version_cmd
changed_when: false
- name: Set Besu Version Fact
set_fact:

@ -1,13 +1,19 @@
---
- name: Ensure we have sane configuration
block:
- fail:
- 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
- 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.
- 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
- fail:
- 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"

@ -1,7 +1,10 @@
---
- name: Get the default ipv4 address
set_fact:
besu_default_ip: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] if hostvars[inventory_hostname]['ansible_default_ipv4']['address'] is defined else '127.0.0.1' }}"
besu_default_ip: >-
{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] if
hostvars[inventory_hostname]['ansible_default_ipv4']['address'] is
defined else '127.0.0.1' }}
besu_aws_public_ip: ""
besu_gcp_public_ip: ""
besu_azure_public_ip: ""

Loading…
Cancel
Save