diff options
Diffstat (limited to 'config/utils')
-rw-r--r-- | config/utils/README.eyaml.rst | 5 | ||||
-rwxr-xr-x | config/utils/check-jinja2.sh | 2 | ||||
-rwxr-xr-x | config/utils/generate_config.py | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/config/utils/README.eyaml.rst b/config/utils/README.eyaml.rst index 083d5192..0031d9d8 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,13 +22,14 @@ Prerequisites $ sudo mkdir -p /etc/eyaml_keys/ $ sudo mv ./keys/* /etc/eyaml_keys/ + $ sudo rmdir ./keys #. Set up eyaml config.yaml .. code-block:: bash $ mkdir ~/.eyaml/ - $ cp config.yaml.example ~/.eyaml/config.yaml + $ cp config.example.yaml ~/.eyaml/config.yaml Encryption ---------- diff --git a/config/utils/check-jinja2.sh b/config/utils/check-jinja2.sh index a19d2090..2953ff6a 100755 --- a/config/utils/check-jinja2.sh +++ b/config/utils/check-jinja2.sh @@ -61,7 +61,7 @@ To troubleshoot PDF parsing against a specific installer adapter, execute the following commands locally (e.g. for zte-pod2/joid): $ ./config/utils/generate_config.py \\ -y labs/zte/pod2.yaml \\ - -j ./pharos/config/installers/joid/pod_config.yaml.j2 + -j config/installers/joid/pod_config.yaml.j2 EOF exit "${RC}" diff --git a/config/utils/generate_config.py b/config/utils/generate_config.py index 37108808..dfc6e6c4 100755 --- a/config/utils/generate_config.py +++ b/config/utils/generate_config.py @@ -57,12 +57,12 @@ ENV.filters['dpkg_arch'] = dpkg_arch try: DICT = yaml.safe_load(check_output(['eyaml', 'decrypt', '-f', ARGS.yaml])) except CalledProcessError as ex: - logging.error('eyaml decryption failed, keys might be missing') + logging.error('eyaml decryption failed!') except OSError as ex: logging.warn('eyaml not found, skipping decryption') try: - DICT -except NameError as ex: + DICT['details'] +except (NameError, TypeError) as ex: logging.warn('PDF decryption skipped, fallback to using raw data.') with open(ARGS.yaml) as _: DICT = yaml.safe_load(_) |