13

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.

15

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.