Commit 22323e0e authored by Joanne Hugé's avatar Joanne Hugé

playbook/edgepacer: add edgepacer playbook

parent f8902fbd
- name: a play that runs entirely on the ansible host
hosts: 127.0.0.1
connection: local
roles:
- edgepacer
#!/usr/bin/env python3
import configparser
import subprocess
CONF_PATH = "/etc/opt/slapos/slapos.cfg"
edgepacer_config = {
'networkcache': {
'download-from-binary-cache-force-url-list': '''
https://lab.nexedi.com/nexedi/slapos/raw/1.
https://lab.node.vifib.com/nexedi/slapos/raw/1.0.''',
},
}
with open('/opt/configure-slapos.log', 'w+') as l:
l.write("[configure-slapos] Configuring slapos...\n")
config = configparser.ConfigParser()
config.read(CONF_PATH)
config['networkcache'].update(edgepacer_config['networkcache'])
with open(CONF_PATH, 'w+') as f:
config.write(f)
---
- name: Configure slapos
script: configure-slapos.py
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment