-
Notifications
You must be signed in to change notification settings - Fork 198
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
tests: Dip our toes into using Ansible #1297
Conversation
This adds a shell primitive to make it easy to execute a playbook task list. The big picture idea is to sync with ostreedev/ostree#1462 and rewrite some of the libvm shell stuff as playbooks, allowing easier code sharing with a-h-t and just in general being a better library for talking ssh and executing commnads.
|
||
dn=$(dirname $0) | ||
. ${dn}/libbuild.sh | ||
pkg_install openssh-clients ansible |
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.
FWIW, PAPR will automatically install openssh-clients
in the container if provisioning a cluster
. No harm in having it here though!
tests/common/libvm.sh
Outdated
@@ -34,6 +34,25 @@ vm_setup() { | |||
|
|||
export SSH="ssh $sshopts $VM" | |||
export SCP="scp $sshopts" | |||
|
|||
cat >${topsrcdir}/ansible-inventory.yml <<EOF |
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.
Hmm, I'm not sure if this is working properly judging from the test logs:
PLAY [vmcheck2] ****************************************************************
skipping: no hosts matched
OTOH, you can probably just drop this and use
ansible-playbook -i ${VM}, --ssh-common-args "${sshopts}" ${playbook}
?
Yep, your suggestions were spot on, thanks! Fixup ⬆️ |
WDYT about incrementally replacing more of the |
Cool! @rh-atomic-bot r+ 4a3019e
Yeah, that works for me. What I'm a bit on the fence on is writing the tests themselves in ansible. Clearly, it's doable, but I'm not convinced it's better than what we have right now. Though a Fedora STI compatible "invocation shim" to start the tests would be super valuable (similar to what we already have in dist-git today). |
⚡ Test exempted: merge already tested. |
This adds a shell primitive to make it easy to execute a playbook
task list.
The big picture idea is to sync with ostreedev/ostree#1462
and rewrite some of the libvm shell stuff as playbooks, allowing easier
code sharing with a-h-t and just in general being a better library for
talking ssh and executing commnads.