diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-03-25 21:26:53 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-03-25 21:26:53 -0400 |
commit | 1054f0b3baed82387bb7546aa79aaf5529e2727f (patch) | |
tree | b50db08c50ae94907b3c3aa07816953f245eddb7 | |
parent | 8ad16ab0761adb05441e8f9e8dcb46add1718498 (diff) | |
download | puppet-tozt-1054f0b3baed82387bb7546aa79aaf5529e2727f.tar.gz puppet-tozt-1054f0b3baed82387bb7546aa79aaf5529e2727f.zip |
fix passphrase escaping
-rw-r--r-- | modules/borgmatic/manifests/init.pp | 2 | ||||
-rw-r--r-- | modules/borgmatic/templates/config.yaml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/borgmatic/manifests/init.pp b/modules/borgmatic/manifests/init.pp index ed9022b..44a472c 100644 --- a/modules/borgmatic/manifests/init.pp +++ b/modules/borgmatic/manifests/init.pp @@ -5,7 +5,7 @@ class borgmatic($host = 'partofme.algo', $extra_paths = []) { $current_hostname = "${facts['networking']['hostname']}" $borgmatic_host = $host - $borgmatic_passphrase = secret::value('borgmatic_passphrase') + $escaped_borgmatic_passphrase = regsubst(secret::value('borgmatic_passphrase'), "'", "''", 'G') file { "/etc/borgmatic": ensure => directory; diff --git a/modules/borgmatic/templates/config.yaml b/modules/borgmatic/templates/config.yaml index 54a5634..bb4d1da 100644 --- a/modules/borgmatic/templates/config.yaml +++ b/modules/borgmatic/templates/config.yaml @@ -18,7 +18,7 @@ location: - /home/doy/tmp storage: - encryption_passphrase: "<%= @borgmatic_passphrase %>" + encryption_passphrase: '<%= @escaped_borgmatic_passphrase %>' ssh_command: /usr/bin/ssh -i /etc/borgmatic/borg_ssh_key -o StrictHostKeyChecking=no retention: |