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

Add downloaded wal-g file check and some other adjustments #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Jamal-B
Copy link

@Jamal-B Jamal-B commented Nov 27, 2023

Description

  • Add wal-g download checksum check to avoid installing a corrupted or altered version. Moreover, the unarchiving task is adapted to the fact that the files included in the tar.gz of recent versions of wal-g have changed compared to older versions.
  • Remove wal-g always ansible tags because we don't want ansible to always execute the wal-g role if we are targeting another role of the playbook.
  • Set files's mode as advised by the ansible documentation.

Tests

  • Change the wal-g version to upgrade or downgrade it while replacing the corresponding sha256 checksum, then validate that the desired version is correctly downloaded and installed.
  • Repeat the same test but without updating the checksum and validate that an ansible error is thrown.
  • Run ansible on a different tag than the one used to include the wal-g role and validate that the wal-g role is no longer executed.

Moreover, the unarchiving task is adapted to the fact that the files
included in the tar.gz of recent versions of wal-g have changed
compared to older versions.
we don't want ansible to always execute the wal-g role if we are
targeting another role of the playbook.
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html#parameter-mode

> For consistent results, quote octal numbers (for example, '644'
or '1777') so Ansible receives a string and can do its own conversion
from string into number. Adding a leading zero (for example, 0755)
works sometimes, but can fail in loops and some other circumstances.
@Jamal-B Jamal-B marked this pull request as ready for review November 27, 2023 11:33
@crrlcx crrlcx closed this Sep 3, 2024
@crrlcx crrlcx reopened this Sep 3, 2024
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