Module apt pass dpkg options

552 views
Skip to first unread message

Rumen Telbizov

unread,
Aug 26, 2013, 6:03:14 PM8/26/13
to ansible...@googlegroups.com
Hello everyone,

I have a quick question/request.
I have just finished rewriting a shell script which was used to
upgrade a given piece of software. Now it's ansible playbook!

The one piece of functionality that I can't find and need is to be
able to pass options to the apt-get command and more precisely
the DPkg::Options::

In particular I need to give it the option: "--force-confnew"
The script current does something like this:

apt-get --allow-unauthenticated -o DPkg::Options::="--force-confnew" install packagename

So is there any way I can pass the -o DPkg::Options::="--force-confnew" part to the
apt module the way it is right now?
It would be nice to have something like dpkg_options="" in the apt module and or only options="" for things like the --allow-unauthenticated.

Thanks,
--
Rumen Telbizov

Rumen Telbizov

unread,
Aug 26, 2013, 8:49:39 PM8/26/13
to ansible...@googlegroups.com
It seems like currently the apt ansible module hard-codes the following:

DPKG_OPTIONS = '-o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"'

Does it sound reasonable to have a "dpkg_options" parameter which will override the above if present?
The documentation should mention the default ones and say that if specified explicitly it will
completely overwrite them.

Cheers,

James Cammarata

unread,
Aug 26, 2013, 8:53:07 PM8/26/13
to ansible...@googlegroups.com
Go ahead and open up a github issue for this, and we'll consider it.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

James Cammarata <jcamm...@ansibleworks.com>
Sr. Software Engineer, AnsibleWorks, Inc.
http://www.ansibleworks.com/

Rumen Telbizov

unread,
Aug 27, 2013, 4:08:47 PM8/27/13
to ansible...@googlegroups.com
Thank you James. Appreciated!

I submitted issue https://github.com/ansible/ansible/issues/3955 for this.

Regards,
Rumen Telbizov
Reply all
Reply to author
Forward
0 new messages