summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/utils/README.eyaml.rst3
-rwxr-xr-xconfig/utils/generate_config.py10
2 files changed, 9 insertions, 4 deletions
diff --git a/config/utils/README.eyaml.rst b/config/utils/README.eyaml.rst
index 083d5192..386a21bb 100644
--- a/config/utils/README.eyaml.rst
+++ b/config/utils/README.eyaml.rst
@@ -12,7 +12,7 @@ Prerequisites
.. code-block:: bash
- $ sudo yum install ruby-gems || sudo apt-get install ruby
+ $ sudo yum install rubygems || sudo apt-get install ruby
$ sudo gem install hiera-eyaml
$ eyaml createkeys
@@ -22,6 +22,7 @@ Prerequisites
$ sudo mkdir -p /etc/eyaml_keys/
$ sudo mv ./keys/* /etc/eyaml_keys/
+ $ sudo rmdir ./keys
#. Set up eyaml config.yaml
diff --git a/config/utils/generate_config.py b/config/utils/generate_config.py
index ba4192cb..37108808 100755
--- a/config/utils/generate_config.py
+++ b/config/utils/generate_config.py
@@ -57,9 +57,13 @@ ENV.filters['dpkg_arch'] = dpkg_arch
try:
DICT = yaml.safe_load(check_output(['eyaml', 'decrypt', '-f', ARGS.yaml]))
except CalledProcessError as ex:
- pass
-if not DICT:
- logging.warn('PDF decryption failed, fallback to using raw data.')
+ logging.error('eyaml decryption failed, keys might be missing')
+except OSError as ex:
+ logging.warn('eyaml not found, skipping decryption')
+try:
+ DICT
+except NameError as ex:
+ logging.warn('PDF decryption skipped, fallback to using raw data.')
with open(ARGS.yaml) as _:
DICT = yaml.safe_load(_)