Merge pull request 'documentation fixes for facts generate command' (#1038) from facts-generate into main
This commit is contained in:
@@ -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" ]; }
|
{ 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.
|
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`.
|
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.
|
We need this for the next step.
|
||||||
|
|||||||
@@ -26,12 +26,16 @@ def check_secrets(machine: Machine, service: None | str = None) -> bool:
|
|||||||
else:
|
else:
|
||||||
secret_name = secret_fact["name"]
|
secret_name = secret_fact["name"]
|
||||||
if not secret_facts_store.exists(service, secret_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))
|
missing_secret_facts.append((service, secret_name))
|
||||||
|
|
||||||
for public_fact in machine.secrets_data[service]["facts"]:
|
for public_fact in machine.secrets_data[service]["facts"]:
|
||||||
if not public_facts_store.exists(service, public_fact):
|
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))
|
missing_public_facts.append((service, public_fact))
|
||||||
|
|
||||||
log.debug(f"missing_secret_facts: {missing_secret_facts}")
|
log.debug(f"missing_secret_facts: {missing_secret_facts}")
|
||||||
|
|||||||
Reference in New Issue
Block a user