Closed
Description
Ansible Version: 2.7.5 (tried 2.7.9 as well)
Ansible Patched: No
Custom Modules: Yes (albeit not likely related to issue)
Have you tried the latest master version from Git?: No
Host and Target Python Versions: 2.7.5
Target OS: CentOS 7.5.1804 (Core)
Base error message:
"module_stderr": "Traceback (most recent call last):\n File \"master:/srv/ansible/lib/python2.7/site-packages/ansible_mitogen/runner.py\", line 883, in _run\n self._run_code(code, mod)\n File \"master:/srv/ansible/lib/python2.7/site-packages/ansible_mitogen/runner.py\", line 862, in _run_code\n exec('exec code in vars(mod)')\n File \"<string>\", line 1, in <module>\n File \"master:/srv/ansible/lib/python2.7/site-packages/ansible/modules/system/firewalld.py\", line 715, in <module>\n File \"master:/srv/ansible/lib/python2.7/site-packages/ansible/modules/system/firewalld.py\", line 605, in main\n File \"master:/srv/ansible/lib/python2.7/site-packages/ansible/modules/system/firewalld.py\", line 171, in __init__\n File \"master:/srv/ansible/lib/python2.7/site-packages/ansible/module_utils/firewalld.py\", line 75, in __init__\n self.zone = fw.getDefaultZone()\n File \"<string>\", line 2, in getDefaultZone\n File \"/usr/lib/python2.7/site-packages/slip/dbus/polkit.py\", line 103, in _enable_proxy\n return func(*p, **k)\n File \"<string>\", line 2, in getDefaultZone\n File \"/usr/lib/python2.7/site-packages/firewall/client.py\", line 53, in handle_exceptions\n return func(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/firewall/client.py\", line 2903, in getDefaultZone\n return dbus_to_python(self.fw.getDefaultZone())\n File \"/usr/lib/python2.7/site-packages/slip/dbus/proxies.py\", line 50, in __call__\n return dbus.proxies._ProxyMethod.__call__(self, *args, **kwargs)\n File \"/usr/lib64/python2.7/site-packages/dbus/proxies.py\", line 145, in __call__\n **keywords)\n File \"/usr/lib64/python2.7/site-packages/dbus/connection.py\", line 651, in call_blocking\n message, timeout)\nDBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.435 was not provided by any .service files\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
verbose-log-output-dbus-exception.txt
Ansible Config Dump:
ANSIBLE_PIPELINING(/home/amurphy/configuration-management/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/home/amurphy/configuration-management/ansible.cfg) = -o ForwardAgent=yes
ANSIBLE_SSH_CONTROL_PATH(/home/amurphy/configuration-management/ansible.cfg) = %(directory)s/%%h-%%r
DEFAULT_ACTION_PLUGIN_PATH(/home/amurphy/configuration-management/ansible.cfg) = [u'/var/lib/awx/venv/awx/lib/python2.7/site-packages/ara/plugins/actions']
DEFAULT_CALLBACK_PLUGIN_PATH(/home/amurphy/configuration-management/ansible.cfg) = [u'/home/amurphy/configuration-management/plugins/callback_plugins']
DEFAULT_CALLBACK_WHITELIST(/home/amurphy/configuration-management/ansible.cfg) = [u'rc', u'profile_tasks', u'es_annotations']
DEFAULT_LOG_PATH(/home/amurphy/configuration-management/ansible.cfg) = /home/amurphy/ansible.log
DEFAULT_LOOKUP_PLUGIN_PATH(/home/amurphy/configuration-management/ansible.cfg) = [u'/home/amurphy/configuration-management/plugins/lookup']
DEFAULT_MANAGED_STR(/home/amurphy/configuration-management/ansible.cfg) = !! Ansible managed: This file was created by ansible. Do not modify by hand! Changes will be overwritten. !!
DEFAULT_MODULE_PATH(/home/amurphy/configuration-management/ansible.cfg) = [u'/home/amurphy/configuration-management/playbooks/library']
DEFAULT_ROLES_PATH(/home/amurphy/configuration-management/ansible.cfg) = [u'/home/amurphy/configuration-management/playbooks/roles', u'/home/amurphy/roles']
DEFAULT_STRATEGY(/home/amurphy/configuration-management/ansible.cfg) = mitogen_linear
DEFAULT_STRATEGY_PLUGIN_PATH(/home/amurphy/configuration-management/ansible.cfg) = [u'/usr/lib/python2.7/site-packages/ansible_mitogen/plugins/strategy', u'/srv/ansible/lib/python2.7/site-packages/ansible_mitogen/plugins/strategy', u'/srv
DEFAULT_VAULT_IDENTITY_LIST(env: ANSIBLE_VAULT_IDENTITY_LIST) = [u'/******']
INVENTORY_UNPARSED_IS_FAILED(/home/amurphy/configuration-management/ansible.cfg) = True
MAX_FILE_SIZE_FOR_DIFF(/home/amurphy/configuration-management/ansible.cfg) = 204800
RETRY_FILES_ENABLED(/home/amurphy/configuration-management/ansible.cfg) = False
So this error has been occurring when we try to enable a service after restarting firewalld. Reload comes back as changed, going to the enable custom service task and bombs out. This is the task order with the last throwing the error:
- name: Template firewalld configuration
template:
src: firewalld.conf.j2
dest: /etc/firewalld/services/{{ item.name }}.xml
mode: '0600'
owner: root
group: root
with_items: '{{ firewalld_custom_services }}'
register: firewall_services_installed
- name: Reload firewalld configuration
service:
name: firewalld
state: restarted
enabled: yes
when: firewall_services_installed.changed == true
- name: Enable custom service
firewalld:
service: "{{ item.name }}"
permanent: true
immediate: true
state: enabled
with_items:
- '{{ firewalld_custom_services }}'