apt module is not installing anything if package source is standard apt repository

12 views
Skip to first unread message

f.floimai...@gmail.com

unread,
May 28, 2018, 10:04:36 AM5/28/18
to Ansible Project
Hi!

I'm having an issue with the apt module and my playbook with Ansible 2.5.3 (2.5.2 is behaving the same).

I'm running the following playbook snippet:

 tasks:
    - name: Install packages required for VMs
      apt:
        name {{ item }} state=present
      with_items:
        - cifs-utils
        - etckeeper
 
The output for all packages is "OK" as if it would be already installed, but it is not.
A later step that mounts a cifs share fails because cifs-utils is in fact not installed (if I run apt-get install cifs-utils directly on the host it would install it, therefore it wasn't there before).

Any hint what might be the problem here?


f.floimai...@gmail.com

unread,
May 28, 2018, 10:05:22 AM5/28/18
to Ansible Project
Just as a follow-up:

If i install a .deb package directly that works flawlessly. Only if the source is the regular apt list, then this happens

Kai Stian Olstad

unread,
May 28, 2018, 10:09:27 AM5/28/18
to ansible...@googlegroups.com
On 28.05.2018 16:04, f.floimai...@gmail.com wrote:
> I'm running the following playbook snippet:
>
> tasks:
> - name: Install packages required for VMs
> apt:
> name {{ item }} state=present
> with_items:
> - cifs-utils
> - etckeeper
>
> The output for all packages is "OK" as if it would be already
> installed,
> but it is not.
> A later step that mounts a cifs share fails because cifs-utils is in
> fact
> not installed (if I run apt-get install cifs-utils directly on the host
> it
> would install it, therefore it wasn't there before).
>
> Any hint what might be the problem here?

Syntax error, missing equal sign after name.

--
Kai Stian Olstad

f.floimai...@gmail.com

unread,
May 28, 2018, 10:17:49 AM5/28/18
to Ansible Project
Oh man, i feel stupid.

That did the trick.

Thanks a lot!
Reply all
Reply to author
Forward
0 new messages