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

tests: Dip our toes into using Ansible #1297

Closed
wants to merge 4 commits into from

Conversation

cgwalters
Copy link
Member

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.

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
Copy link
Member

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!

@@ -34,6 +34,25 @@ vm_setup() {

export SSH="ssh $sshopts $VM"
export SCP="scp $sshopts"

cat >${topsrcdir}/ansible-inventory.yml <<EOF
Copy link
Member

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}

?

@cgwalters
Copy link
Member Author

Yep, your suggestions were spot on, thanks! Fixup ⬆️

@cgwalters
Copy link
Member Author

WDYT about incrementally replacing more of the libvm.sh bits with Ansible?

@jlebon
Copy link
Member

jlebon commented Mar 9, 2018

Cool! @rh-atomic-bot r+ 4a3019e

WDYT about incrementally replacing more of the libvm.sh bits with Ansible?

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).

@rh-atomic-bot
Copy link

⚡ Test exempted: merge already tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants