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

Fix Archlinux variables configuration #250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mike-code
Copy link

Using this role on Archlinux as-is won't work because the variables defined in Arch.yml are not included due to missing task which would include them.

This PR adds include_vars task for Archlinux distro, the same way as for other distributions.
Note that ansible_distribution_version return NA for Archlinux, thus it's not used in this fix.

console output from failed role installation ``` TASK [geerlingguy.postgresql : include_tasks] ****************************************************************************************************** included: /Users/retard/iac/ansible/_common/roles/geerlingguy.postgresql/tasks/variables.yml for vagrant

TASK [geerlingguy.postgresql : Include OS-specific variables (Debian).] ****************************************************************************
skipping: [vagrant]

TASK [geerlingguy.postgresql : Include OS-specific variables (RedHat).] ****************************************************************************
skipping: [vagrant]

TASK [geerlingguy.postgresql : Include OS-specific variables (Amazon).] ****************************************************************************
skipping: [vagrant]

TASK [geerlingguy.postgresql : Include OS-specific variables (Fedora).] ****************************************************************************
skipping: [vagrant]

TASK [geerlingguy.postgresql : Define postgresql_packages.] ****************************************************************************************
fatal: [vagrant]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: '__postgresql_packages' is undefined. '__postgresql_packages' is undefined\n\nThe error appears to be in '/Users/retard/iac/ansible/_common/roles/geerlingguy.postgresql/tasks/variables.yml': line 22, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Define postgresql_packages.\n ^ here\n"}

PLAY RECAP *****************************************************************************************************************************************
vagrant : ok=2 changed=0 unreachable=0 failed=1 skipped=4 rescued=0 ignored=0

</details>

Copy link

This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@github-actions github-actions bot added the stale label Nov 24, 2023
@fhsctv
Copy link

fhsctv commented Dec 27, 2023

Maybe we should use the first_found lookup (see https://docs.ansible.com/ansible/latest/collections/ansible/builtin/first_found_lookup.html) for this to avoid having an own include task for each distribution.

@github-actions github-actions bot removed the stale label Dec 29, 2023
@sachilles
Copy link

@geerlingguy This role cannot be used on Archlinux without this PR. Could you please accept this 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 this pull request may close these issues.

None yet

3 participants