Verified Commit 24112892 authored by Evangelos Foutras's avatar Evangelos Foutras 🐱
Browse files

hcloud_inventory: use read-only API key for hcloud

parent b4d60ae2
...@@ -27,8 +27,8 @@ def get_host_details(server): ...@@ -27,8 +27,8 @@ def get_host_details(server):
def main(): def main():
args = parse_args() args = parse_args()
loaded = load_vault('misc/vaults/vault_hetzner.yml') loaded = load_vault('misc/vaults/vault_hcloud.yml')
client = Client(token=loaded["hetzner_cloud_api_key"]) client = Client(token=loaded["hcloud_api_key_readonly"])
servers = client.servers.get_all() servers = client.servers.get_all()
hostvars = {server.name: get_host_details(server) for server in servers} hostvars = {server.name: get_host_details(server) for server in servers}
......
$ANSIBLE_VAULT;1.1;AES256
64363566353835316331303139336231656638643563343264646563613566643265353864643939
6435346530353063346337333837303736323733663030370a373833373935333961343732656165
62323136353130643564643862663433366664323132663532663338623864313838353662366632
3663333932653262380a396634326431333761396562306566643464643463623166616536323666
38613966333933373235663566373139333330623964383530663962383562643336323933313730
36646261396139613562616637373139373661313266336230663533333664303363626538396264
62613537353432616461633033643965386661636533303934336161323136656138333362623836
63366535333339353365376239393564656631343234313262383437313638613339633937623261
3665
Supports Markdown
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