18

I'm trying to follow parameters/examples, yet running into following WARNING message while executing Ansible'playbook:

TASK [apt (pre)] ********************************************************************************************
[WARNING]: The value True (type bool) in a string field was converted to u'True' (type string). If this does
not look like what you expect, quote the entire value to ensure it does not change.

relevant part of playbook:

- name: apt (pre)
  apt:
    update_cache: yes
    upgrade: yes

Please advise.

1 Answer 1

21

I was able to recreate your results.

What I found is upgrade is expecting a string value. In addition to yes and no you can use dist, full, or safe

Changing your playbook to the following should achieve the desired results:

---
- hosts: localhost
  remote_user: root
  tasks:
          - name: apt (pre)
            apt:
                update_cache: yes
                upgrade: 'yes'

Reference

Ansible Apt Module

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .