theforeman / foreman-ansible-modules

Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello
GNU General Public License v3.0
147 stars 163 forks source link

katello_content_view A value must be provided for the organization #106

Closed flyemsafe closed 5 years ago

flyemsafe commented 6 years ago

Not sure what i am missing here. I provided a value for organization, yet the module fail. Please see the error message below.

Tasks

- name: Create Content Views
  katello_content_view:
    username: "{{ katello_username }}"
    password: "{{ katello_password }}"
    server_url: "{{ katello_server_url }}"
    verify_ssl: "{{ katello_verify_ssl }}"
    name: 'OpenShift'
    organization: ACME
    repositories:

Error

<localhost> ESTABLISH LOCAL CONNECTION FOR USER: tomer
<localhost> EXEC /bin/sh -c 'sudo -H -S  -p "[sudo via ansible, key=sxtiitxkjuprfshwsfnppwfjxtzcande] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-sxtiitxkjuprfshwsfnppwfjxtzcande; /usr/bin/python'"'"' && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_FcQZTl/ansible_module_katello_content_view.py", line 205, in <module>
    main()
  File "/tmp/ansible_FcQZTl/ansible_module_katello_content_view.py", line 201, in main
    module.fail_json(msg=e)
  File "/tmp/ansible_FcQZTl/ansible_modlib.zip/ansible/module_utils/basic.py", line 2294, in fail_json
  File "/tmp/ansible_FcQZTl/ansible_modlib.zip/ansible/module_utils/basic.py", line 2272, in _return_formatted
  File "/tmp/ansible_FcQZTl/ansible_modlib.zip/ansible/module_utils/basic.py", line 514, in remove_values
  File "/tmp/ansible_FcQZTl/ansible_modlib.zip/ansible/module_utils/basic.py", line 497, in _remove_values_conditions
TypeError: Value of unknown type: <type 'exceptions.TypeError'>, A value must be provided for the "organization" field.

fatal: [localhost]: FAILED! => {
    "changed": false, 
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_FcQZTl/ansible_module_katello_content_view.py\", line 205, in <module>\n    main()\n  File \"/tmp/ansible_FcQZTl/ansible_module_katello_content_view.py\", line 201, in main\n    module.fail_json(msg=e)\n  File \"/tmp/ansible_FcQZTl/ansible_modlib.zip/ansible/module_utils/basic.py\", line 2294, in fail_json\n  File \"/tmp/ansible_FcQZTl/ansible_modlib.zip/ansible/module_utils/basic.py\", line 2272, in _return_formatted\n  File \"/tmp/ansible_FcQZTl/ansible_modlib.zip/ansible/module_utils/basic.py\", line 514, in remove_values\n  File \"/tmp/ansible_FcQZTl/ansible_modlib.zip/ansible/module_utils/basic.py\", line 497, in _remove_values_conditions\nTypeError: Value of unknown type: <type 'exceptions.TypeError'>, A value must be provided for the \"organization\" field.\n", 
    "module_stdout": "", 
    "msg": "MODULE FAILURE", 
    "rc": 1
}
    to retry, use: --limit @/home/tomer/.ansible/playbooks/sat601-katello.retry

PLAY RECAP *********************************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1   
flyemsafe commented 6 years ago

Looks like some issue with nailgun, perhaps it does not work with Satellite 6.3? I see the CV was created, just no repos where associated. I noticed the example i posted cut off the repos section.

sean797 commented 6 years ago

@flyemsafe is this still an issue? Nailgun has a 6.3.z branch that should ensure compatibility with 6.3.

sean797 commented 5 years ago

Closing due to inactivity.