-
Notifications
You must be signed in to change notification settings - Fork 23
test: test reboot and unlock with separate nbde_server machine #266
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| standard-inventory-qcow2: | ||
| qemu: | ||
| m: 2048 | ||
| drive: | ||
| - size: 10737418240 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| --- | ||
| - name: Setup nbde_server | ||
| hosts: nbde-server | ||
| tasks: | ||
| - name: Deploy NBDE server for testing | ||
| include_role: | ||
| name: fedora.linux_system_roles.nbde_server | ||
|
richm marked this conversation as resolved.
|
||
|
|
||
| - name: Test simple bind | ||
| hosts: nbde-client | ||
| vars: | ||
| nbde_client_bindings: | ||
| - device: "{{ nbde_client_test_device }}" | ||
| encryption_password: "{{ nbde_client_test_encryption_password }}" | ||
| servers: | ||
| - http://nbde-server | ||
|
|
||
| tasks: | ||
| - name: Set up test environment | ||
| include_tasks: tasks/setup_test.yml | ||
|
|
||
| - name: Run the test | ||
| block: | ||
| - name: Use nbde_client role | ||
| include_tasks: tasks/run_role_with_clear_facts.yml | ||
| vars: | ||
| __sr_public: true | ||
|
|
||
| - name: Flush handlers | ||
| meta: flush_handlers | ||
|
|
||
| - name: Reboot the client | ||
| reboot: | ||
|
|
||
| - name: Verify that the test file is present with the unencrypted contents | ||
| copy: | ||
| content: "{{ nbde_client_test_file_contents }}" | ||
| dest: "{{ nbde_client_test_file }}" | ||
| mode: "0644" | ||
| register: __register_copy_test_file | ||
| failed_when: __register_copy_test_file is failed or __register_copy_test_file is changed | ||
| rescue: | ||
| - name: Check various states of the system | ||
| shell: | ||
| executable: /bin/bash | ||
| cmd: | | ||
| set -uxo pipefail | ||
| exec 1>&2 | ||
| df -H | ||
| mount | ||
| cat /etc/fstab | ||
| cat /etc/crypttab | ||
| ls -alrtF /mnt/nbde_client_test | ||
| dmesg | grep -E -i 'luks|clevis' | ||
| journalctl -ex | grep -E -i 'luks|clevis' | ||
| journalctl -ex -u clevis-luks-askpass.service | ||
| lsblk | ||
| blkid | ||
| lsinitrd | grep -i clevis | ||
| clevis luks list -d {{ nbde_client_test_device }} | ||
| systemctl --version | ||
| firewall-cmd --list-all-zones | ||
| grep type=AVC /var/log/audit/audit.log | ||
| exit 0 | ||
| changed_when: false | ||
|
|
||
| - name: Check the nbde_server machine | ||
| delegate_to: nbde-server | ||
| shell: | ||
| executable: /bin/bash | ||
| cmd: | | ||
| set -uxo pipefail | ||
| exec 1>&2 | ||
| journalctl -ex | ||
| ss -nltp | ||
| firewall-cmd --list-all-zones | ||
| grep type=AVC /var/log/audit/audit.log | ||
| changed_when: false | ||
|
|
||
| - name: Fail | ||
| fail: | ||
|
|
||
| always: | ||
| - name: Clean up test environment | ||
| include_tasks: tasks/cleanup_test.yml | ||
| # vim:set ts=2 sw=2 et: | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.