Compare commits
No commits in common. "89861bd8982e8bc4ced9504aca4bc80d872f9785" and "d2f8df88bf874d25401bab2dbeba7e17328b9735" have entirely different histories.
89861bd898
...
d2f8df88bf
4 changed files with 1 additions and 92 deletions
|
@ -17,7 +17,7 @@ svc_systemd['grafana-server'] = {
|
|||
admin_password = node.metadata.get('grafana/config/security/admin_password')
|
||||
port = node.metadata.get('grafana/config/server/http_port')
|
||||
actions['reset_grafana_admin_password'] = {
|
||||
'command': f"sleep 5 && grafana-cli admin reset-admin-password {quote(admin_password)}",
|
||||
'command': f"grafana-cli admin reset-admin-password {quote(admin_password)}",
|
||||
'unless': f"curl http://admin:{quote(admin_password)}@localhost:{port}/api/org",
|
||||
'needs': [
|
||||
'svc_systemd:grafana-server',
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
# directories = {
|
||||
# '/etc/iperf3': {
|
||||
# 'purge': True,
|
||||
# }
|
||||
# }
|
||||
|
||||
# files = {
|
||||
# '/etc/iperf3/authorized_users': {
|
||||
# 'content': '\n'.join(
|
||||
# node.metadata.get('iperf3/authorized_users')
|
||||
# )
|
||||
# },
|
||||
# }
|
|
@ -1,77 +0,0 @@
|
|||
from hashlib import sha256
|
||||
|
||||
|
||||
defaults = {
|
||||
'apt': {
|
||||
'packages': {
|
||||
'iperf3': {},
|
||||
'iperf': {
|
||||
'installed': False,
|
||||
},
|
||||
}
|
||||
},
|
||||
# 'iperf3': {
|
||||
# 'username': node.name,
|
||||
# 'password': repo.vault.password_for(f'{node.name} iperf3').value,
|
||||
# 'authorized_users': {},
|
||||
# },
|
||||
'nftables': {
|
||||
'input': {
|
||||
'tcp dport 5202 ip saddr 10.0.0.0/8 accept',
|
||||
'udp dport 5202 ip saddr 10.0.0.0/8 accept',
|
||||
},
|
||||
},
|
||||
'systemd': {
|
||||
'units': {
|
||||
'iperf3.service': {
|
||||
'Unit': {
|
||||
'Description': 'iperf3 server',
|
||||
'After': {
|
||||
'syslog.target',
|
||||
'network.target',
|
||||
},
|
||||
},
|
||||
'Service': {
|
||||
# 'ExecStart': '/usr/bin/iperf3 --server --port 5202 --authorized-users-path /etc/iperf3/authorized_users',
|
||||
'ExecStart': '/usr/bin/iperf3 --server --port 5202',
|
||||
},
|
||||
'Install': {
|
||||
'WantedBy': {
|
||||
'multi-user.target',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
'services': {
|
||||
'iperf3.service': {},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
# @metadata_reactor.provides(
|
||||
# 'iperf3/hash',
|
||||
# )
|
||||
# def hash(metadata):
|
||||
# username, password = metadata.get('iperf3/username'), metadata.get('iperf3/password')
|
||||
|
||||
# return {
|
||||
# 'iperf3': {
|
||||
# 'hash': sha256(f'{{{username}}}{password}'.encode()).hexdigest(),
|
||||
# },
|
||||
# }
|
||||
|
||||
|
||||
# @metadata_reactor.provides(
|
||||
# 'iperf3/authorized_users',
|
||||
# )
|
||||
# def iperf3(metadata):
|
||||
# return {
|
||||
# 'iperf3': {
|
||||
# 'authorized_users': set(
|
||||
# f"{other_node.metadata.get('iperf3/username')},{other_node.metadata.get('iperf3/hash')}"
|
||||
# for other_node in repo.nodes
|
||||
# if other_node.has_bundle('iperf3')
|
||||
# ),
|
||||
# },
|
||||
# }
|
|
@ -6,7 +6,6 @@
|
|||
'apt',
|
||||
'nftables',
|
||||
'pip',
|
||||
'iperf3',
|
||||
],
|
||||
'metadata': {
|
||||
'apt': {
|
||||
|
|
Loading…
Reference in a new issue