1
0
forked from clan/clan-core

Merge pull request 'documentation fixes for facts generate command' (#1038) from facts-generate into main

This commit is contained in:
clan-bot 2024-03-25 14:38:30 +00:00
commit 6055dbe123
2 changed files with 7 additions and 3 deletions

View File

@ -36,7 +36,7 @@ As a user you can also append to the list by adding your own directories to be b
{ clanCore.state.userdata.folders = [ "/home" "/root" ]; }
```
Than run `clan secrets generate <yourmachine>` replacing `<yourmachine>` with the actual machine name.
Than run `clan facts generate <yourmachine>` replacing `<yourmachine>` with the actual machine name.
This will generate the backup borg credentials and ssh keys for accessing the borgbackup repository.
Your ssh public key will be stored in the root of the repository here at this location `./machines/<yourmachine>/facts/borgbackup.ssh.pub`.
We need this for the next step.

View File

@ -26,12 +26,16 @@ def check_secrets(machine: Machine, service: None | str = None) -> bool:
else:
secret_name = secret_fact["name"]
if not secret_facts_store.exists(service, secret_name):
log.info(f"Secret fact {secret_fact} for service {service} is missing")
log.info(
f"Secret fact '{secret_fact}' for service {service} is missing."
)
missing_secret_facts.append((service, secret_name))
for public_fact in machine.secrets_data[service]["facts"]:
if not public_facts_store.exists(service, public_fact):
log.info(f"public Fact {public_fact} for service {service} is missing")
log.info(
f"Public fact '{public_fact}' for service {service} is missing."
)
missing_public_facts.append((service, public_fact))
log.debug(f"missing_secret_facts: {missing_secret_facts}")