Skip to content

Commit

Permalink
fixup! Enable deployment roles testing using Github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rjeffman committed Jan 2, 2025
1 parent 322e6bc commit 25188ab
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
# ansible_vars: test/deployment/ipaserver-vars.yml
distro: ${{ matrix.distro }}
test_playbooks: >-
${{ env.test_path }}/tests/deployment/test_kinit.yml
${{ env.test_path }}/tests/user/test_user.yml
${{ env.test_path }}/tests/group/test_group.yml
${{ env.test_path }}/tests/host/test_host.yml
Expand Down Expand Up @@ -106,6 +107,7 @@ jobs:
ansible_vars: test/deployment/ipareplica-vars.yml
distro: ${{ matrix.distro }}
test_playbooks: >-
${{ env.test_path }}/tests/deployment/test_kinit.yml
${{ env.test_path }}/tests/user/test_user.yml
${{ env.test_path }}/tests/group/test_group.yml
${{ env.test_path }}/tests/host/test_host.yml
Expand Down Expand Up @@ -141,6 +143,7 @@ jobs:
# ansible_vars: test/deployment/ipaclient-vars.yml
distro: ${{ matrix.distro }}
test_playbooks: >-
${{ env.test_path }}/tests/deployment/test_kinit.yml
${{ env.test_path }}/tests/user/test_user_client_context.yml
${{ env.test_path }}/tests/group/test_group_client_context.yml
${{ env.test_path }}/tests/host/test_host_client_context.yml
Expand Down
17 changes: 17 additions & 0 deletions tests/deployment/test_kinit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: Test if admin user can get TGT on the host
hosts: all
become: false
gather_facts: false

tasks:
- name: Run kinit on host
ansible.builtin.shell: "kinit admin <<< {{ ipaadmin_password }}"
register: kinit
changed_when: not kinit.failed

- name: Cleanup TGT ticket
ansible.builtin.shell: "kdestroy -A"
when: not kinit.failed
register: cleanup
changed_when: not cleanup.failed

0 comments on commit 25188ab

Please sign in to comment.