Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playbook not idempotent: console key is regenerated every run #119

Open
franklouwers opened this issue Feb 15, 2024 · 0 comments · May be fixed by #120
Open

Playbook not idempotent: console key is regenerated every run #119

franklouwers opened this issue Feb 15, 2024 · 0 comments · May be fixed by #120

Comments

@franklouwers
Copy link

The code which checks if the console has already been set, fails every time. This causes the console key to be regenerated every run.

When debugging the command which checks the key, Ansible reports:

    "dnsdist_grepkey_cmd": {
        "changed": false,
        "cmd": "set -o pipefail && fgrep setKey \"/etc/dnsdist/dnsdist.conf\" | sed 's/setKey(\"\\(.*\\)\")/\\1/'\n",
        "delta": "0:00:00.006208",
        "end": "2024-02-15 13:41:22.905134",
        "failed": false,
        "failed_when_result": false,
        "msg": "non-zero return code",
        "rc": 2,
        "start": "2024-02-15 13:41:22.898926",
        "stderr": "/bin/sh: 1: set: Illegal option -o pipefail",
        "stderr_lines": [
            "/bin/sh: 1: set: Illegal option -o pipefail"
        ],
        "stdout": "",
        "stdout_lines": []
    }

I'll investigate some more (could be bash vs sh) and add a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant