Skip to content

PKI: Fix intermediate certificate idempotency #60

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

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

markgoddard
Copy link

Fix idempotency of intermediate certificates

Prior to this change running the vault_pki role multiple times when generating an intermediate certificate could result in the following error:

    TASK [vault_pki : Set Intermediate as signed] **********************************
    fatal: [localhost]: FAILED! =>
      msg: |-
        The task includes an option with an undefined variable. The error was:
        'dict object' has no attribute 'data'
    
        The error appears to be in 'roles/vault_pki/tasks/intermediate.yml': line
        45, column 7, but may be elsewhere in the file depending on the exact
        syntax problem.
    
        The offending line appears to be:
    
            - name: "Set Intermediate as signed"
              ^ here

This change adds the same condition used in other tasks.

The tests have also been updated to cover PKI idempotency.

Prior to this change running the vault_pki role multiple times when generating
an intermediate certificate could result in the following error:

TASK [vault_pki : Set Intermediate as signed] **********************************
fatal: [localhost]: FAILED! =>
  msg: |-
    The task includes an option with an undefined variable. The error was:
    'dict object' has no attribute 'data'

    The error appears to be in 'roles/vault_pki/tasks/intermediate.yml': line
    45, column 7, but may be elsewhere in the file depending on the exact
    syntax problem.

    The offending line appears to be:

        - name: "Set Intermediate as signed"
          ^ here

This change adds the same condition used in other tasks.
@markgoddard markgoddard self-assigned this Sep 22, 2023
@markgoddard markgoddard requested a review from a team as a code owner September 22, 2023 09:23
@mnasiadka mnasiadka merged commit 816b19f into master Oct 4, 2023
@mnasiadka mnasiadka deleted the fix-intermediate-idempotency branch October 4, 2023 11:45
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 this pull request may close these issues.

2 participants