Closed nre-ableton closed 1 year ago
molecule.yml
can embed ansible configuration to allow for a shell supporting pipefail (provided it's installed):
provisioner:
name: ansible
config_options:
defaults:
executable: /bin/bash
molecule.yml
can embed ansible configuration to allow for a shell supporting pipefail (provided it's installed):provisioner: name: ansible config_options: defaults: executable: /bin/bash
Thanks for the advice, I didn't know about this configuration trick. I did some experimentation, but unfortunately I couldn't get it to work because the dokken
Docker images ship a bash version that doesn't support set -o pipefile
.
As such, I've updated the commit messages, comment in .ansible-lint
, and PR description. Please have another look when you have a moment @bbaassssiiee, thanks!
@bbaassssiiee Thanks for the review!
The primary purpose of this PR is to fix the gossip key generation issues, which this PR does by avoiding the race condition in Ansible when using
copy
with thecontent
attribute when delegated tolocalhost
.Additionally, I "fixed" CI by suppressing
risky-shell-pipe
in ansible-lint. Unfortunately, addingset -o pipefail
ahead of theshell
commands isn't a great solution because the Molecule tests execute with/bin/sh
, which unlike/bin/bash
lacks support forset -o pipefail
. The version of the shell that ships with the Docker container used by the Molecule tests also doesn't supportset -o pipefail
, so setting Molecule's executable won't work either.FWIW, the reason that CI is currently broken is because even though we pinned the
molecule-action
GitHub action, it doesn't pin the Docker image correctly (see https://github.com/gofrolist/molecule-action/issues/140). An update to this image now forces us to fix new ansible-lint violations just to get CI back up and running.Fixes https://github.com/ansible-community/ansible-consul/issues/506