Open Tas-sos opened 9 months ago
In my attempt to solve this, I have also installed the following python 3 modules.
But again exactly the same:
msg: cannot import name 'kinit_password' from 'ipapython.ipautil'
But, nothing changed.
ansible-freeipa modules are supporting management nodes that are part of an IPA domain as a client or server. If the node is part of an IPA domain, all the needed packages and bindings are installed and the management modules are able to be used. ansible-core and ansible-freeipa is only needed on the controller, it is not needed on the management nodes.
The management node needs to deployed as a server/replica or client in an IPA domain. Installing ipaclient with pip is not able to do this.
For information how to deploy a client, please have a look at https://github.com/freeipa/ansible-freeipa/blob/master/roles/ipaclient/README.md
So, the task below cannot be run on my laptop - which is not an IPA server/client ( at least client ) ?
---
- name: Create service
delegate_to: localhost
freeipa.ansible_freeipa.ipaservice:
name: "{{ item.principal }}"
principal: "{{ item.aliases | default(omit) }}"
state: "present"
ipaadmin_principal: "{{ ipa_host_enrollment_principal }}"
ipaadmin_password: "{{ ipa_host_enrollment_password }}"
loop: "{{ custom_keytabs }}"
As you mentioned above from the Ansible controller side you only need ansible-core
& ansible-freeipa
. \
So I cannot run the above from my localhost, if my localhost/controller is not already deployed as a server/replica or client in an IPA domain.
Excuse me, I'm confused because I ran it locally and the error message doesn't help me enough. \ Could we change the error message to give more information about what is going wrong? For example, with some kind of condition checking whether "Ω" has already been done or not, print "χ message", otherwise "ψ message".
Thank you very much for your prompt reply above and for the really useful reference which is really helpful! :pray:
Good point, please open a ticket to work on the error messages for missing IPA bindings.
@Tas-sos no, you can't delegate the task to your localhost if it is not a server or a client in a FreeIPA deployment.
The controller does not need to be part of FreeIPA, but any target node needs to be.
We should make this clearer in the documentation, but IMO, working this on the error messages provided will open a lot of unknown issues, and this might be too much work for too small improvement.
Python system libraries/modules/packages installed
```bash apt list --installed | grep python WARNING: apt does not have a stable CLI interface. Use with caution in scripts. hexchat-python3/oldstable,now 2.14.3-6+deb11u1 amd64 [installed] libpython3-dev/oldstable,now 3.9.2-3 amd64 [installed] libpython3-stdlib/oldstable,now 3.9.2-3 amd64 [installed,automatic] libpython3.9-dev/oldstable,now 3.9.2-1 amd64 [installed,automatic] libpython3.9-minimal/oldstable,now 3.9.2-1 amd64 [installed,automatic] libpython3.9-stdlib/oldstable,now 3.9.2-1 amd64 [installed,automatic] libpython3.9/oldstable,now 3.9.2-1 amd64 [installed,automatic] python-apt-common/oldstable,now 2.2.1 all [installed,automatic] python-pip-whl/oldstable,now 20.3.4-4+deb11u1 all [installed,automatic] python3-aiohttp/oldstable,now 3.7.4-1 amd64 [installed,automatic] python3-appdirs/oldstable,now 1.4.4-1 all [installed,automatic] python3-apt/oldstable,now 2.2.1 amd64 [installed,automatic] python3-argcomplete/oldstable,now 1.8.1-1.5 all [installed,automatic] python3-async-timeout/oldstable,now 3.0.1-1.1 all [installed,automatic] python3-attr/oldstable,now 20.3.0-1 all [installed,automatic] python3-autopep8/oldstable,now 1.5.5-1 all [installed] python3-brlapi/oldstable,now 6.3+dfsg-1+deb11u1 amd64 [installed,automatic] python3-bs4/oldstable,now 4.9.3-1 all [installed,automatic] python3-cairo/oldstable,now 1.16.2-4+b2 amd64 [installed,automatic] python3-certifi/oldstable,now 2020.6.20-1 all [installed,automatic] python3-cffi-backend/oldstable,now 1.14.5-1 amd64 [installed,automatic] python3-chardet/oldstable,now 4.0.0-1 all [installed,automatic] python3-click/oldstable,now 7.1.2-1 all [installed,automatic] python3-colorama/oldstable,now 0.4.4-1 all [installed,automatic] python3-configobj/oldstable,now 5.0.6-4 all [installed,automatic] python3-cryptography/oldstable,now 3.3.2-1 amd64 [installed,automatic] python3-cups/oldstable,now 2.0.1-4+b1 amd64 [installed,automatic] python3-cupshelpers/oldstable,now 1.5.14-1 all [installed,automatic] python3-dbus/oldstable,now 1.2.16-5 amd64 [installed,automatic] python3-debconf/oldstable,now 1.5.77 all [installed,automatic] python3-debian/oldstable,now 0.1.39 all [installed,automatic] python3-debianbts/oldstable,now 3.1.0 all [installed,automatic] python3-decorator/oldstable,now 4.4.2-2 all [installed,automatic] python3-dev/oldstable,now 3.9.2-3 amd64 [installed,automatic] python3-distro-info/oldstable,now 1.0+deb11u1 all [installed,automatic] python3-distro/oldstable,now 1.5.0-1 all [installed,automatic] python3-distutils/oldstable,now 3.9.2-1 all [installed,automatic] python3-dns/oldstable,now 3.2.1-1 all [installed] python3-firewall/oldstable,now 0.9.3-2 all [installed,automatic] python3-gi-cairo/oldstable,now 3.38.0-2 amd64 [installed,automatic] python3-gi/oldstable,now 3.38.0-2 amd64 [installed,automatic] python3-gnucash/oldstable,now 1:4.4-1 amd64 [installed,automatic] python3-gpg/oldstable,now 1.14.0-1+b2 amd64 [installed,automatic] python3-html5lib/oldstable,now 1.1-3 all [installed,automatic] python3-httplib2/oldstable,now 0.18.1-3 all [installed,automatic] python3-ibus-1.0/oldstable,now 1.5.23-2 all [installed,automatic] python3-idna/oldstable,now 2.10-1 all [installed,automatic] python3-jedi/oldstable,now 0.18.0-1 all [installed] python3-ldap/oldstable,now 3.2.0-4+b3 amd64 [installed] python3-ldb/oldstable,oldstable-security,now 2:2.2.3-2~deb11u2 amd64 [installed,automatic] python3-lib2to3/oldstable,now 3.9.2-1 all [installed,automatic] python3-libvirt/oldstable,now 7.0.0-2 amd64 [installed,automatic] python3-libxml2/oldstable,oldstable-security,now 2.9.10+dfsg-6.7+deb11u4 amd64 [installed,automatic] python3-louis/oldstable,now 3.16.0-1 all [installed,automatic] python3-lxml/oldstable,oldstable-security,now 4.6.3+dfsg-0.1+deb11u1 amd64 [installed,automatic] python3-magic/oldstable,now 2:0.4.20-3 all [installed,automatic] python3-mako/oldstable,now 1.1.3+ds1-2 all [installed,automatic] python3-markupsafe/oldstable,now 1.1.1-1+b3 amd64 [installed,automatic] python3-minimal/oldstable,now 3.9.2-3 amd64 [installed,automatic] python3-multidict/oldstable,now 5.1.0-1 amd64 [installed,automatic] python3-mypy-extensions/oldstable,now 0.4.3-2 all [installed,automatic] python3-nautilus/oldstable,now 1.2.3-3+b1 amd64 [installed,automatic] python3-nftables/oldstable,now 0.9.8-3.1+deb11u2 amd64 [installed,automatic] python3-olefile/oldstable,now 0.46-3 all [installed,automatic] python3-parso/oldstable,now 0.8.1-1 all [installed,automatic] python3-pathspec/oldstable,now 0.8.1-1 all [installed,automatic] python3-pep8/oldstable,now 1.7.1-9 all [installed,automatic] python3-pil/oldstable,oldstable-security,now 8.1.2+dfsg-0.3+deb11u1 amd64 [installed,automatic] python3-pip/oldstable,now 20.3.4-4+deb11u1 all [installed] python3-pkg-resources/oldstable,now 52.0.0-4 all [installed,automatic] python3-psutil/oldstable,now 5.8.0-1 amd64 [installed,automatic] python3-pyasn1-modules/oldstable,now 0.2.1-1 all [installed,automatic] python3-pyasn1/oldstable,now 0.4.8-1 all [installed,automatic] python3-pyatspi/oldstable,now 2.38.1-1 all [installed,automatic] python3-pycodestyle/oldstable,now 2.6.0-1 all [installed,automatic] python3-pycurl/oldstable,now 7.43.0.6-5 amd64 [installed,automatic] python3-pyfavicon/oldstable,now 0.1.1+dfsg1-3 all [installed,automatic] python3-pygments/oldstable,now 2.7.1+dfsg-2.1 all [installed,automatic] python3-pyinotify/oldstable,now 0.9.6-1.3 all [installed,automatic] python3-pyotp/oldstable,now 2.3.0-1 all [installed,automatic] python3-pysimplesoap/oldstable,now 1.16.2-3 all [installed,automatic] python3-pyxattr/oldstable,now 0.7.2-1+b1 amd64 [installed,automatic] python3-pyzbar/oldstable,now 0.1.8-2 all [installed,automatic] python3-regex/oldstable,now 0.1.20201113-1 amd64 [installed,automatic] python3-reportbug/oldstable,now 7.10.3+deb11u1 all [installed] python3-requests/oldstable,now 2.25.1+dfsg-2 all [installed,automatic] python3-selinux/oldstable,now 3.1-3 amd64 [installed,automatic] python3-setuptools/oldstable,now 52.0.0-4 all [installed,automatic] python3-six/oldstable,now 1.16.0-2 all [installed,automatic] python3-slip-dbus/oldstable,now 0.6.5-2 all [installed,automatic] python3-slip/oldstable,now 0.6.5-2 all [installed,automatic] python3-smbc/oldstable,now 1.0.23-1+b1 amd64 [installed,automatic] python3-software-properties/oldstable,now 0.96.20.2-2.1 all [installed,automatic] python3-soupsieve/oldstable,now 2.2.1-1 all [installed,automatic] python3-speechd/oldstable,now 0.10.2-2+deb11u2 all [installed,automatic] python3-sqlparse/oldstable,now 0.4.1-1 all [installed,automatic] python3-systemd/oldstable,now 234-3+b4 amd64 [installed,automatic] python3-tabulate/oldstable,now 0.8.7-0.1 all [installed,automatic] python3-talloc/oldstable,now 2.3.1-2+b1 amd64 [installed,automatic] python3-toml/oldstable,now 0.10.1-1 all [installed,automatic] python3-typed-ast/oldstable,now 1.4.2-1 amd64 [installed,automatic] python3-typing-extensions/oldstable,now 3.7.4.3-1 all [installed,automatic] python3-unidiff/oldstable,now 0.5.5-2 all [installed,automatic] python3-uno/oldstable,oldstable-security,now 1:7.0.4-4+deb11u8 amd64 [installed,automatic] python3-urllib3/oldstable,now 1.26.5-1~exp1 all [installed,automatic] python3-venv/oldstable,now 3.9.2-3 amd64 [installed] python3-webencodings/oldstable,now 0.5.1-2 all [installed,automatic] python3-wheel/oldstable,now 0.34.2-1 all [installed,automatic] python3-xdg/oldstable,now 0.27-2 all [installed,automatic] python3-yaml/oldstable,now 5.3.1-5 amd64 [installed,automatic] python3-yapf/oldstable,now 0.30.0-1 all [installed] python3-yarl/oldstable,now 1.6.3-2 amd64 [installed,automatic] python3-yoyo/oldstable,now 7.3.1+dfsg1-1 all [installed,automatic] python3.9-dev/oldstable,now 3.9.2-1 amd64 [installed,automatic] python3.9-minimal/oldstable,now 3.9.2-1 amd64 [installed,automatic] python3.9-venv/oldstable,now 3.9.2-1 amd64 [installed,automatic] python3.9/oldstable,now 3.9.2-1 amd64 [installed,automatic] python3/oldstable,now 3.9.2-3 amd64 [installed,automatic] ```Python required modules ( requirements.txt )
```bash ansible-core==2.15.9 # Collections Requirements # freeipa.ansible_freeipa.ipaservice netaddr==1.2.1 gssapi==1.8.3 ipalib==4.10.2 ```Ansible required collections ( requirements.yml )
```yaml --- collections: - name: ansible.posix version: 1.5.4 - name: community.general version: '>=7.4.0,<7.5.0' - name: freeipa.ansible_freeipa version: '>=1.11.1,<1.12.0' ```Output
I cannot understand why I have this error.
I have this error with the following versions:
Any advice/help/idea ?