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

ci: Run Fedora/CentOS CI in GH Actions + unbreak debian buster CI run #135

Merged
merged 5 commits into from
Jan 8, 2024

Conversation

Jakuje
Copy link
Collaborator

@Jakuje Jakuje commented Jan 8, 2024

Enhancement: Run tests on Fedora and CentOS

Reason: The downstream testing is down-sizing and moving upstream

Result: We are able to catch issues earlier in upstream.

Issue Tracker Tickets (Jira or BZ if any): -

@Jakuje Jakuje requested a review from richm as a code owner January 8, 2024 13:09
@Jakuje
Copy link
Collaborator Author

Jakuje commented Jan 8, 2024

Fixes for the debian buster live here: roles-ansible/check-ansible-debian-buster-action#4

Note, that the buster is getting phased out by Ansible as I am getting the errors new ansible will not be supported on the native python 3.7.x:

[DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. Current

@Jakuje
Copy link
Collaborator Author

Jakuje commented Jan 8, 2024

The debian action was fixed now. But Fedora for some reason does not work and I was not able to reproduce this in local container. Any hint why it should be failing would be welcomed.

- name: Reinstall manual pages for openssh-clients on RHEL
ansible.builtin.command: "{{ pkg_mgr }} reinstall -y openssh-clients"
when:
- ansible_facts['os_family'] == "RedHat" and not __ssh_is_ostree | bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ansible_facts['os_family'] == "RedHat" and not __ssh_is_ostree | bool
- ansible_facts['os_family'] == "RedHat"
- not __ssh_is_ostree | bool

since you are already using the multi-line when condition format

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Changed. I am never sure if it is and or or when writing the when condition ...

@richm
Copy link
Contributor

richm commented Jan 8, 2024

The debian action was fixed now. But Fedora for some reason does not work and I was not able to reproduce this in local container. Any hint why it should be failing would be welcomed.

Don't know - strange. Try adding the environment variable ANSIBLE_VERBOSITY: "2" to the fedora github action.

@Jakuje
Copy link
Collaborator Author

Jakuje commented Jan 8, 2024

The debian action was fixed now. But Fedora for some reason does not work and I was not able to reproduce this in local container. Any hint why it should be failing would be welcomed.

Don't know - strange. Try adding the environment variable ANSIBLE_VERBOSITY: "2" to the fedora github action.

Good idea.

Looks like the getent_passwd is set in to the ansible_facts so should I access it from there as ansible_facts['getent_passwd'][username][4].

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/getent_module.html

@richm
Copy link
Contributor

richm commented Jan 8, 2024

minor linter issues, otherwise, lgtm

@Jakuje
Copy link
Collaborator Author

Jakuje commented Jan 8, 2024

Thanks for the review! Squashed and cleaned up.

@richm richm merged commit 50e46d7 into linux-system-roles:main Jan 8, 2024
@richm
Copy link
Contributor

richm commented Jan 8, 2024

@Jakuje looks like the same change for Fedora needs to be made to sshd - https://github.com/willshersystems/ansible-sshd/actions/runs/7451303938/job/20272119608?pr=272

@Jakuje
Copy link
Collaborator Author

Jakuje commented Jan 8, 2024

@Jakuje looks like the same change for Fedora needs to be made to sshd - https://github.com/willshersystems/ansible-sshd/actions/runs/7451303938/job/20272119608?pr=272

yeah. Commented there we have it in the outstanding PR willshersystems/ansible-sshd#267. I can pull it into separate PR if needed.

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