Description of problem: RHEL 8 ships with python 3 by default so our ansible modules need to be compatible with python 3. Currently running the manageiq-automate role will yield the following error: [----] I, [2019-07-31T15:53:07.528940 #13951:2b098d0725bc] INFO -- : Q-task_id([r5_service_template_provision_task_5]) MIQ(ManageIQ::Providers::EmbeddedAnsible::AutomationManager::PlaybookRunner#log_stdout) Stdout from playbook manageiq-automate_role_bug_example.yml: PLAY [manageiq-automate role bug example] ************************************** TASK [manageiq-core.manageiq-automate : Initialize the Workspace] ************** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'dict' object has no attribute 'iteritems' fatal: [localhost]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/libexec/platform-python"}, "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1564602748.1169078-260481528705529/AnsiballZ_manageiq_automate.py\", line 114, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1564602748.1169078-260481528705529/AnsiballZ_manageiq_automate.py\", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1564602748.1169078-260481528705529/AnsiballZ_manageiq_automate.py\", line 49, in invoke_module\n imp.load_module('__main__', mod, module, MOD_DESC)\n File \"/usr/lib64/python3.6/imp.py\", line 235, in load_module\n return load_source(name, filename, file)\n File \"/usr/lib64/python3.6/imp.py\", line 170, in load_source\n module = _exec(spec, sys.modules[name])\n File \"<frozen importlib._bootstrap>\", line 618, in _exec\n File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\n File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n File \"/tmp/ansible_manageiq_automate_payload_mwfakkab/__main__.py\", line 503, in <module>\n File \"/tmp/ansible_manageiq_automate_payload_mwfakkab/__main__.py\", line 489, in main\nAttributeError: 'dict' object has no attribute 'iteritems'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1} PLAY RECAP ********************************************************************* localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 Version-Release number of selected component (if applicable): 5.11.0.17 Steps to Reproduce: 1. Create an ansible playbook automate method which runs one of the listed modules 2. Run the method 3. Observe failures Actual results: Playbook fails Expected results: Playbook succeeds Additional info: The issue was initially discovered as a part of validating bug 1734902 which allows us to run playbooks using those roles out of the box.
PR: https://github.com/ManageIQ/manageiq-content/pull/556
Do we have any examples of manageiq-vmdb failing with Python 3? The title of this BZ suggests that's the case, though there is no use of the `iteritems()` method in manageiq-vmdb.
PR: https://github.com/ManageIQ/manageiq-content/pull/556 is closed due to new information that the changes will need to be backwards compatible with Python 2, 3
*** This bug has been marked as a duplicate of bug 1738542 ***
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days