I want to run the following apt
command via the ansible module.
apt-get update -o Dir::Etc::sourcelist="sources.list.d/mypackages.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
I don't want to use the shell module for this purpose as follows.
- name: update apt package manager with parameters
shell: 'apt-get update -o Dir::Etc::sourcelist="sources.list.d/mypackages.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"'
Later after executing the update, I am installing these packages,
- name: install plugin and core package
apt:
pkg:
- dump_plugin
- core
state: present
allow_unauthenticated: yes
update_cache: yes