I have a yaml file format like:
sshd:
pubkeys:
user1:
- key1
- key2
user2:
- key1
Then I would like to use confd template to generate a config file based on it.
Looks like confd doesn't like the formate, I tried the following template:
{{range gets "/sshd/pubkeys/*"}}
{{.}}
{{end}}
But it returned nothing.
Could someone take a look?
Also,
I tried:
{{range $pub_key := ls "/sshd/pubkeys/user1"}}
{{$pub_key}}
{{end}}
I expected it will return key1 and key2 to me, but instead, I got value 0 and 1, so the index.
How could I get the value?