diff --git a/ansible/group_vars/faucet-miners.yml b/ansible/group_vars/faucet-miners.yml index 980a0a5..7b7f6f1 100644 --- a/ansible/group_vars/faucet-miners.yml +++ b/ansible/group_vars/faucet-miners.yml @@ -1,6 +1,6 @@ --- # stage contains the network name miner_network: '{{ stage }}' -miner_account_pass: '{{lookup("passwordstore", "services/faucet/miners-pass")}}' miner_base_account_addr: '{{lookup("passwordstore", "services/faucet/account-addr")}}' miner_base_account_pass: '{{lookup("passwordstore", "services/faucet/account-pass")}}' +miner_base_account_json: '{{lookup("passwordstore", "services/faucet/account-json")}}' diff --git a/ansible/roles/geth-miner/defaults/main.yml b/ansible/roles/geth-miner/defaults/main.yml index c888859..2a8a2c3 100644 --- a/ansible/roles/geth-miner/defaults/main.yml +++ b/ansible/roles/geth-miner/defaults/main.yml @@ -8,17 +8,17 @@ miner_network_ids: miner_network: ~ miner_network_id: '{{ miner_network_ids[miner_network] | mandatory }}' -# miner etherum account -miner_account_pass: ~ # miner reward account miner_base_account_pass: ~ miner_base_account_addr: ~ +miner_base_account_json: ~ miner_cont_tag: v1.8.23 miner_cont_image: 'ethereum/client-go:{{ miner_cont_tag }}' miner_cont_name: 'geth-miner' miner_cont_vol: '/docker/{{ miner_cont_name }}' +miner_verbosity: 3 miner_extra_data: 'Status.im Miner' miner_main_port: 30303 miner_rpc_port: 8545 diff --git a/ansible/roles/geth-miner/tasks/config.yml b/ansible/roles/geth-miner/tasks/config.yml index 21d80c1..db63e58 100644 --- a/ansible/roles/geth-miner/tasks/config.yml +++ b/ansible/roles/geth-miner/tasks/config.yml @@ -1,30 +1,27 @@ --- - name: Create container folders file: - path: '{{ miner_cont_vol }}/data' + path: '{{ item }}' state: directory mode: 0750 owner: dockremap group: docker + with_items: + - '{{ miner_cont_vol }}/data' + - '{{ miner_cont_vol }}/data/keystore' - name: Create account password file copy: - dest: '{{ miner_cont_vol }}/data/account.pass' - content: '{{ miner_account_pass }}' - mode: 0750 + dest: '{{ miner_cont_vol }}/data/keystore/faucet.pass' + content: '{{ miner_base_account_pass | mandatory }}' + mode: 0640 owner: dockremap group: docker - -- name: Create miner account - docker_container: - name: 'miner-account-gen' - image: '{{ miner_cont_image }}' - user: root - pull: true - command: | - account new - --datadir=/data - --password=/data/account.pass - volumes: - - '{{ miner_cont_vol }}/data:/data:rw' +- name: Create account keystore file + copy: + dest: '{{ miner_cont_vol }}/data/keystore/faucet.json' + content: '{{ miner_base_account_json | mandatory }}' + mode: 0640 + owner: dockremap + group: docker diff --git a/ansible/roles/geth-miner/tasks/container.yml b/ansible/roles/geth-miner/tasks/container.yml index 59cff6e..8799e8e 100644 --- a/ansible/roles/geth-miner/tasks/container.yml +++ b/ansible/roles/geth-miner/tasks/container.yml @@ -15,7 +15,7 @@ command: | --networkid={{ miner_network_id }} --datadir=/data - --password=/data/account.pass + --password=/data/keystore/faucet.pass --shh --shh.pow={{ miner_shh_pow }} --rpc