teemtee / tmt

Test Management Tool
MIT License
85 stars 127 forks source link

Add support for ad hoc commands to ansible plugin #2433

Open happz opened 1 year ago

happz commented 1 year ago

A possible solution of https://github.com/teemtee/tmt/issues/1279:

... there is also a possibility to extend ansible plugin to accept ad hoc commands in a way similar to ansible command, https://docs.ansible.com/ansible/latest/command_guide/intro_adhoc.html. The usage might then look like this:

prepare:
  - how: ansible
    module: yum_repository
    module-args:
      baseurl: http://foo.dot.com/some/repo
      description: A repository
      gpgcheck: 1
tmt run ... prepare --insert \
                    --how ansible \
                    --module yum_repository \
                    --module-args "baseurl=http://foo.dot.com/some/repo description=\"A repository\" gpgcheck=1"
thrix commented 1 year ago

interesting idea, true is that this would definitely help with also non-RHEL distros (where Ansible has support for them), so +1 from me

juk commented 1 year ago

@happz thank you. +1

psss commented 1 year ago

Nice idea! Sounds like a very elegant solution to me. Let's try 1.30?