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

ansible: Document how to run a playbook against a local VM #574

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@ Setup/maintenance Ansible playbooks for Front Door CI
* [e2e](./e2e/): Playbooks for configuring CI on e2e machines
* [roles](./roles/): Ansible roles for common setup steps
* [maintenance](./maintenance/): Ansible playbooks for maintenance tasks on all CI machines

Testing against a local VM
---------------------------

You can run the Ansible playbooks or roles against a local VM for development.
There is an example [localvm inventory](./inventory/localvm) which adds the
[standard cockpit](https://github.com/cockpit-project/cockpit/blob/main/test/README.md#convenient-test-vm-ssh-access)
`c` SSH machine. Start e.g. a `fedora-coreos` or `fedora-39` VM, and locally
adjust the `hosts:` playbook you are working on from e.g. `e2e` to `localvm`
(the playbooks don't do that by default to avoid errors about unreachable
host).
15 changes: 5 additions & 10 deletions ansible/e2e/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,11 @@
command: passwd -l root

- name: Disable zezere service
service:
name: zezere_ignition.timer
state: stopped
enabled: no

- name: Disable zezere banner
service:
name: zezere_ignition_banner.service
state: stopped
enabled: no
shell: |
if systemctl list-unit-files zezere_ignition.timer; then
systemctl disable --now zezere_ignition.timer
systemctl disable --now zezere_ignition_banner.service
fi

- name: Disable unconnected network interfaces to avoid NM-wait-online timeout
copy:
Expand Down
3 changes: 3 additions & 0 deletions ansible/inventory/localvm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[localvm]
# standard cockpit test VM from bots
c
Loading