Skip to content

Commit

Permalink
fixup: Better test log.
Browse files Browse the repository at this point in the history
  • Loading branch information
rjeffman committed May 19, 2023
1 parent ed27baa commit 44e81eb
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/multihost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ jobs:
run: |
vagrant ssh-config | tee "vagrant-ssh" | ./get_ip.sh > inventory/group_vars/all.yml
- name: Ansible ping target hosts.
- name: Test host connection
run: |
ansible -i inventory --ssh-extra-args "-F vagrant-ssh" -m ping all
- name: Log scenario configuration
run: ansible -i inventory --ssh-extra-args "-F vagrant-ssh" -m debug -a var=hostvars localhost | tee 'scenario.log'

# Here is where you add tests...
- name: Test IPA server deploy
run: ansible-playbook -i inventory --ssh-extra-args "-F vagrant-ssh" playbooks/install-server.yml
Expand All @@ -78,14 +81,20 @@ jobs:
ssh -F tests/multihost/vagrant-ssh cli-01.ipa.test "sudo chmod a+r /var/log/*.log"
mkdir -p logs/client-logs
scp -F tests/multihost/vagrant-ssh [email protected]:/var/log/ipaclient-install.log logs/client-logs || true
tar czvf multihost-logs.tar.gz logs
# tar czvf multihost-logs.tar.gz logs
- name: Save artifacts
if: failure()
# if: github.event.state == 'error' || github.event.state == 'failure'
uses: actions/upload-artifact@v3
with:
path: multihost-logs.tar.gz
name: test-results
# path: multihost-logs.tar.gz
path: |
logs/
inventory/
vagrant-ssh
scenario.log
if-no-files-found: "ignore"

# Cleanup
Expand Down

0 comments on commit 44e81eb

Please sign in to comment.