I'm using the Satellite6 Content Views role found here:  
https://galaxy.ansible.com/ahuffman/satellite6_manage_content_views.  It 
works on Ansible up to 2.8.6, but any version after that gives the 
following error:

TASK [satellite6_manage_content_views : Set content view remove list] 
********************************************************************************************************************
fatal: [test-server]: FAILED! => {"msg": "Unexpected templating type error 
occurred on ({{ cv_ver_names | difference(cv_keep_list) }}): coercing to 
Unicode: need string or buffer, dict found"}

I filed an issue on the author's Github repo in October when Ansible 2.9 
rc5 was automatically installed on my system, but nothing has been done 
with it since I filed it.  I'd like to try and fix it myself, but I don't 
understand what the error means or is doing.  Here's the YAML code that's 
being executed when it fails:


---
- name: "Create list of content view version names"
  set_fact:
    cv_ver_names: "{{ cv_qry.json.results[0] | json_query(cv_ver_names_jq ) 
| sort(attribute='id',reverse=True) }}"
  vars:
    cv_ver_names_jq: "versions[*].{name: version, id: id}"

- debug:
    var: "cv_ver_names"
    verbosity: "1"

- name: "Set content view version keep list"
  set_fact:
    cv_keep_list: "{{ keep_qry }}"
  vars:
    keep_count: ":{{ cv.keep_content_view_versions_count }}"
    keep_qry: "{{ '{{' }} cv_ver_names[{{ keep_count }}] {{ '}}' }}"

- debug:
    var: "cv_keep_list"
    verbosity: "1"

- name: "Set content view remove list"
  set_fact:
    cv_remove_list: "{{ cv_ver_names | difference(cv_keep_list) }}"

- debug:
    var: "cv_remove_list"
    verbosity: "1"

Any help would be appreciated.

Thanks,
Harry

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/48cf5321-f37a-4c56-a642-e5de05c2d080%40googlegroups.com.

Reply via email to