Hi Robin, On 27.03.19 17:16, Robin Roevens wrote: > Hi all > > I'm currently trying to get rid of all deprecation warnings as we upgraded > Ansible 2.3 to 2.7.9 (CentOS 7.4) > And I have this code: > > - name: Install required system packages > yum: > name: "{{ item }}" > state: 'present' > with_items: > - "{{ base_packages }}" > - "{{ additional_packages | d(omit) }}"
Assuming base_packages and additional_packages are lists, try: - name: install pkgs yum: state: present name: "{{ base_pkgs + additional_pkgs | default([]) }}" Ansible wants a flat list here. The suggestion in the deprecation warning thinks both are just normal values and wants you to put them into a list. But if you already have lists, merge them with + as in the above code. HTH, Sebastian -- Sebastian Meyer Linux Consultant & Trainer Mail: me...@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5560e97b-8eae-16b4-c4c7-63377eb6f134%40b1-systems.de. For more options, visit https://groups.google.com/d/optout.