ansible-netdata icon indicating copy to clipboard operation
ansible-netdata copied to clipboard

packages are not updated when already installed

Open wasrek404 opened this issue 3 years ago • 0 comments

I think this task:

- name: install pre-requisites
  package:
    name: "{{ item }}"
    state: present
  with_items: "{{ netdata_script_dependencies }}"
  register: _install_dep_packages
  until: _install_dep_packages is succeeded
  retries: 5
  delay: 2

The 'state' part shouldn't be present but latest like so:

- name: install pre-requisites
  package:
    name: "{{ item }}"
    state: latest
  with_items: "{{ netdata_script_dependencies }}"
  register: _install_dep_packages
  until: _install_dep_packages is succeeded
  retries: 5
  delay: 2

I noticed this when running your role on a host that already had all software installed just not the latest version. Reinstalling the dependencies manually on the host with apt solved all the issues I had with this role. Can you adapt the role so it updates the dependencies when updating/installing?

Thanks for the role, I use it a lot!

wasrek404 avatar Nov 10 '21 00:11 wasrek404