-
Notifications
You must be signed in to change notification settings - Fork 0
ci: Use generalized action to test against different distributions #2
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Ansible CI | ||
| on: [push, pull_request] | ||
|
|
||
| env: | ||
| ANSIBLE_INJECT_FACT_VARS: "false" | ||
|
|
||
| jobs: | ||
| test: | ||
| if: | | ||
| !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || | ||
| (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os_image: | ||
| - alpine:latest | ||
| - quay.io/centos/centos:stream8 | ||
| - quay.io/centos/centos:stream9 | ||
| - quay.io/centos/centos:stream10 | ||
| - debian:bullseye | ||
| - debian:bookworm | ||
| - debian:latest | ||
| - fedora:latest | ||
| - ubuntu:22.04 | ||
| - ubuntu:24.04 | ||
| - ubuntu:latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Test Ansible SSH Role | ||
| uses: Jakuje/check-ansible-action@main | ||
| with: | ||
| image: ${{ matrix.os_image }} | ||
| group: local | ||
| hosts: localhost | ||
| targets: "tests/tests_*.yml" | ||
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,4 +44,5 @@ | |
| - (ansible_facts['os_family'] in ['RedHat', 'Suse'] | ||
| and ansible_facts['distribution_major_version'] | int >= 8) or | ||
| (ansible_facts['distribution'] == 'Ubuntu' | ||
| and ansible_facts['distribution_major_version'] | int >= 20) | ||
| and ansible_facts['distribution_major_version'] | int >= 20) or | ||
| ansible_facts['distribution'] == 'Alpine' | ||
|
Comment on lines
44
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Align Alpine bootstrap package with the new Alpine role defaults. Line 48 opts Alpine into the Alpine-specific path, but the bootstrap package resolver still falls through to Suggested fix - name: Make sure openssh is installed before creating backup
vars:
__ssh_test_packages: >-
{{
"openssh-clients" if ansible_facts['os_family'] in ['RedHat', 'Suse']
- else "openssh-client"
+ else ("openssh-client-default"
+ if ansible_facts['distribution'] == 'Alpine'
+ else "openssh-client")
}}🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,6 +13,8 @@ | |||||||||
| (ansible_facts['distribution'] in ['RedHat', 'CentOS'] and | ||||||||||
| ansible_facts['distribution_version'] | int >= 8) %} | ||||||||||
| Include /etc/ssh/ssh_config.d/*.conf | ||||||||||
| {% elif ansible_facts['os_family'] == 'Alpine' %} | ||||||||||
| Include /etc/ssh/ssh_config.d/ | ||||||||||
|
Comment on lines
+16
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix Alpine expectation to match the role’s Alpine defaults. Line 17 expects Suggested fix {% elif ansible_facts['os_family'] == 'Alpine' %}
- Include /etc/ssh/ssh_config.d/
+ Include /etc/ssh/ssh_config.d/*.conf📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| {% else %} | ||||||||||
| GSSAPIAuthentication yes | ||||||||||
| {% endif %} | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| __ssh_packages: ['openssh-client-default'] | ||
|
|
||
| __ssh_supports_drop_in: true | ||
| __ssh_drop_in_name: "00-ansible" | ||
|
|
||
| # This default lists the main configuration file defaults | ||
| __ssh_defaults: | ||
| Include: /etc/ssh/ssh_config.d/*.conf |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| __ssh_packages: ['openssh-client'] | ||
|
|
||
| # This system supports drop in directory so defaults are adjusted | ||
| __ssh_supports_drop_in: true | ||
| __ssh_drop_in_name: "00-ansible" | ||
|
|
||
| # This default lists the main configuration file defaults | ||
| __ssh_defaults: | ||
| Include: /etc/ssh/ssh_config.d/*.conf | ||
| Host: | ||
| - Condition: "*" | ||
| SendEnv: LANG LC_* COLORTERM NO_COLOR | ||
| HashKnownHosts: true | ||
| GSSAPIAuthentication: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: spetrosi/ssh
Length of output: 231
🏁 Script executed:
sed -n '31,35p' .github/workflows/ansible-check.ymlRepository: spetrosi/ssh
Length of output: 188
Pin GitHub Actions to immutable commit SHAs instead of moving refs.
uses: ...@v6anduses: ...@mainallow upstream changes to alter CI behavior without any PR in this repo. Pin both actions to their resolved commit SHAs:🔒 Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents