Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Amin Vakil
infrastructure
Commits
24112892
Verified
Commit
24112892
authored
May 01, 2022
by
Evangelos Foutras
🐱
Browse files
hcloud_inventory: use read-only API key for hcloud
parent
b4d60ae2
Changes
2
Hide whitespace changes
Inline
Side-by-side
hcloud_inventory.py
View file @
24112892
...
...
@@ -27,8 +27,8 @@ def get_host_details(server):
def
main
():
args
=
parse_args
()
loaded
=
load_vault
(
'misc/vaults/vault_h
etzner
.yml'
)
client
=
Client
(
token
=
loaded
[
"h
etzner_
cloud_api_key"
])
loaded
=
load_vault
(
'misc/vaults/vault_h
cloud
.yml'
)
client
=
Client
(
token
=
loaded
[
"hcloud_api_key
_readonly
"
])
servers
=
client
.
servers
.
get_all
()
hostvars
=
{
server
.
name
:
get_host_details
(
server
)
for
server
in
servers
}
...
...
misc/vaults/vault_hcloud.yml
0 → 100644
View file @
24112892
$ANSIBLE_VAULT;1.1;AES256
64363566353835316331303139336231656638643563343264646563613566643265353864643939
6435346530353063346337333837303736323733663030370a373833373935333961343732656165
62323136353130643564643862663433366664323132663532663338623864313838353662366632
3663333932653262380a396634326431333761396562306566643464643463623166616536323666
38613966333933373235663566373139333330623964383530663962383562643336323933313730
36646261396139613562616637373139373661313266336230663533333664303363626538396264
62613537353432616461633033643965386661636533303934336161323136656138333362623836
63366535333339353365376239393564656631343234313262383437313638613339633937623261
3665
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment