Skip to content

Commit

Permalink
feat(deployment): Enable state-sync on validator nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman committed Mar 31, 2023
1 parent e8a87ab commit eafd61e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/deployment/ansible/roles/install-cosmos/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,31 @@
section: api
option: swagger
value: 'true'

- name: Set custom pruning
ini_file:
path: '/home/{{ service }}/.{{ service }}/config/app.toml'
section:
option: '{{ item.option }}'
value: '{{ item.value }}'
with_items:
- { option: 'pruning', value: '"custom"' }
- { option: 'pruning-interval', value: '10' }
- { option: 'pruning-keep-recent', value: '10' }
- {
option: 'pruning-keep-every',
value: "{{lookup('env', 'AG_SETUP_COSMOS_STATE_SYNC_INTERVAL') or 500}}",
}

- name: Set state-sync
ini_file:
path: '/home/{{ service }}/.{{ service }}/config/app.toml'
section: state-sync
option: '{{ item.option }}'
value: '{{ item.value }}'
with_items:
- { option: 'snapshot-keep-recent', value: '2' }
- {
option: 'snapshot-interval',
value: "{{lookup('env', 'AG_SETUP_COSMOS_STATE_SYNC_INTERVAL') or 500}}",
}

0 comments on commit eafd61e

Please sign in to comment.