command/shell module warn deprecation

99 views
Skip to first unread message

John Petro

unread,
Jul 12, 2023, 11:30:39 AM7/12/23
to ansible...@googlegroups.com
Good Morning,
  I manage the building of some virtual machine templates using packer.  I am leveraging ansible as part of this, and when I am doing some cleanup after the setup is done to prepare for the conversion to template, and a couple of the options I need in yum/dnf, etc don't exist in the module don't exist.  So, to get around this, I am using the command module, but I get a warning that I should use the module, but that if I am doing it for a specific reason, I should use warn: false or set the option to ignore warnings in my ansible.cfg.  Since I am using a "ansible_local" provisioner in packer, I don't use an ansible.cfg, so I was wondering if there is another way to accomplish the warn: false option since it has been removed in the more recent versions of ansible.

--John

Rowe, Walter P. (Fed)

unread,
Jul 12, 2023, 11:39:43 AM7/12/23
to ansible...@googlegroups.com
I think you can place an ansible.cfg file in the folder where your ansible is running. We do this for our packer image management service that also uses ansible in the provisioner stage.

Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAPAjob92oJ2rXs8UnESjNJ4URE37WtO0XZ1P0O9Sbo980RQ5_A%40mail.gmail.com.

Rowe, Walter P. (Fed)

unread,
Jul 12, 2023, 11:39:43 AM7/12/23
to ansible...@googlegroups.com
I think you can place an ansible.cfg file in the folder where your ansible is running. We do this for our packer image management service that also uses ansible in the provisioner stage.

Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123
On Jul 12, 2023, at 11:30 AM, John Petro <jcp...@johnpetro.com> wrote:

John Petro

unread,
Jul 12, 2023, 11:42:27 AM7/12/23
to ansible...@googlegroups.com
yeah, I saw that, and I might go down that road, but wanted to see if there was a better way first. 

--jp

Reply all
Reply to author
Forward
0 new messages