mirror of
https://github.com/status-im/infra-les.git
synced 2025-02-16 06:17:25 +00:00
32 lines
660 B
YAML
32 lines
660 B
YAML
|
---
|
||
|
- name: Create directories for geth
|
||
|
file:
|
||
|
path: '{{ geth_keys }}'
|
||
|
state: directory
|
||
|
|
||
|
- name: Find all enode files
|
||
|
find:
|
||
|
paths: '{{ geth_keys }}'
|
||
|
patterns: 'UTC--*'
|
||
|
file_type: file
|
||
|
register: account_files
|
||
|
|
||
|
- name: Set Geth password to be empty
|
||
|
copy:
|
||
|
dest: '{{ geth_keys }}/password'
|
||
|
content: ''
|
||
|
|
||
|
- name: Generate Geth account
|
||
|
docker_container:
|
||
|
name: '{{ geth_name }}'
|
||
|
image: '{{ geth_image }}'
|
||
|
pull: true
|
||
|
auto_remove: yes
|
||
|
command: |
|
||
|
account new
|
||
|
--keystore=/keys
|
||
|
--password=/keys/password
|
||
|
volumes:
|
||
|
- '{{ geth_vol }}/keys:/keys:rw'
|
||
|
when: account_files.files | length == 0
|