Commit Graph

141 Commits

Author SHA1 Message Date
Thomas Woerner
915cc39b31 ipaclient,ipareplica: Set ipaclient_ssh_trust_dns to no by default 2018-07-19 14:15:47 +02:00
Thomas Woerner
695d09aa69 ipaclient: Backup and set hostname explicitly
This is needed to use ipaclient in ipareplica for client deployment.
2018-07-19 14:14:45 +02:00
Thomas Woerner
e6cd47bcce ipa-krb5/tasks/main.yml: Create additional .ipabkp for krb5.conf
This is done in IPAChangeConf.changeConf and IPAChangeConf.newConf
2018-07-19 14:10:01 +02:00
Thomas Woerner
1b2f6d7e8b ipaclient: Set default_domain in krb5.conf in the same way as ipa-client-install
Set default_domain if not ipadiscovery.dnsok or not ipadiscovery.kdc like it
is done in ipa-client-install.
2018-07-19 13:00:39 +02:00
Thomas Woerner
0154f36a69 Added ipa- prefix to krb5 and sssd roles as these are ansible-freeipa specific
These roles will most likely not work in the common case. Therefore the roles
have been renamed.

The ipa-krpb5 role is used by ipcalient, but the ipa-sssd role is currently
not used.
2018-07-19 12:58:30 +02:00
Thomas Woerner
eced45bb53 ipareplica/library/ipareplica_custodia_import_dm_password: Fix post 4.7 use
custodiainstance.import_dm_password does not support master_host_name post
4.6.90 anymore. A new inspect call has been added to verify if the arg is
supported or not.
2018-07-17 13:49:10 +02:00
Thomas Woerner
b26d366732 ipareplica/library/ipareplica_custodia_import_dm_password: Also use custodia here
custodia needs to be used here with newer IPA versions (introduced with 4.6.4).
With this master_host_name does is not supplied to custodia.import_dm_password
as an arguemtn anymore.
2018-07-09 13:48:03 +02:00
Thomas Woerner
f69c13cfd6 ipareplica: Do no use IPA version to check for get_custodia_instance existance
The use of IPA versions to determine if get_custodia_instance should be
used was not optimal as the patch that introduced this has been back-ported
to the EL-7 package with verion 4.5.4. As get_custodia_instance was not
available before we can simply check if get_custodia_instance exists in
custodiainstance.
2018-07-09 13:47:09 +02:00
Thomas Woerner
b282fc5088 ipaserver/library/ipaserver_test: adtrust message should be warning
Tee message for a domain and realm name mismatch should be a warning and
not a fail in the ipaserver test. It is also a warning in the normal
installer.
2018-07-09 13:39:17 +02:00
Thomas Woerner
c8be120e78 ipaserver: Do no use IPA version to check for get_custodia_instance existance
The use of IPA versions to determine if get_custodia_instance should be
used was not optimal as the patch that introduced this has been back-ported
to the EL-7 package with verion 4.5.4. As get_custodia_instance was not
available before we can simply check if get_custodia_instance exists in
custodiainstance.
2018-07-09 13:07:47 +02:00
Thomas Woerner
c0eff23da0 ipareplica: Drop debugging remain show_obj 2018-07-09 13:00:36 +02:00
Siva Paramasivam
2f3ee6dc29 Added missing parameter realm to setup_kra 2018-07-06 23:04:55 -07:00
Siva Paramasivam
720204fe5a var files for CentOS 7 (now that the default is compatible with Fedora not RHEL) 2018-07-06 22:20:05 -07:00
Siva Paramasivam
22d188fcb0 CentOS 7 compatibility.
Lowered version check to be compatible with CentOS 7.5
Added missing attributes to setup_kra to be compatible with latest python2-ipaserver librarty on CentOS 7.5 (python2-ipaserver-4.5.4-10.el7.centos.3.noarch)
2018-07-06 22:13:27 -07:00
Thomas Woerner
34fe6103db ipaclient/library/ipanss.py: Fixed wrong name in paths.GETENT compat check
The paths.GETENT compat check was using "KDESTROY" instead of "GETENT".
2018-06-28 17:32:07 +02:00
Ian Tewksbury
d6ff55d8c6 ipadiscovery.py - fix typo of timconf to timeconf 2018-06-27 14:23:46 -04:00
Thomas Woerner
b53a415fcb ipareplica/vars: New Fedora-27 specific file, updated ipareplica_packages_adtrust
A new Fedora-27 ditribution specific file has been added. Additionally
ipareplica_packages_adtrust has been updated in all files to contain
[free]ipa-server-trust-ad.
2018-06-25 15:45:29 +02:00
Thomas Woerner
3db47b2ce8 ipaserver/vars: New Fedora-27 specific file, updated ipaserver_packages_adtrust
A new Fedora-27 ditribution specific file has been added. Additionally
ipaserver_packages_adtrust has been updated in all files to contain
[free]ipa-server-trust-ad.
2018-06-25 15:31:07 +02:00
Thomas Woerner
e6f8f10790 ipareplica: Add support for 4.7 (4.6.90-pre2)
With IPA 4.7 bigger changes have been introduced

Changes:
- Use of timeconf and chrony instead of ntpconf and ntpd.
- custodia instance needed for ca and kra
- Use of create_ipa_conf with changed setting in setup_http for install_http,
  reverted back afterwards.
2018-06-21 13:40:51 +02:00
Thomas Woerner
037b3c0b41 ipareplica: Link used ipaserver modules instead of using a copy
Affected files:
- ipareplica/library/ipaserver_enable_ipa.py
- ipareplica/library/ipaserver_master_password.py
- ipareplica/library/ipaserver_setup_ntp.py
2018-06-21 13:33:09 +02:00
Thomas Woerner
25d5198f48 ipareplica/library/ipareplica_restart_kdc.py: Comemnted out _pkinit_pkcs12_info
The _pkinit_pkcs12_info var seems not to be needed for now. Will be removed
in a following cleanup.
2018-06-21 13:30:05 +02:00
Thomas Woerner
74a55d6efd ipaserver/vars/default.yml: Use python3-libselinux instead of libselinux-python
The python3 bindings should be required and not the python2 bindings as a
default.
2018-06-21 13:27:41 +02:00
Thomas Woerner
587fef68ad ipaserver: Fixed typos
Affected files:
- ipaserver/library/ipaserver_enable_ipa.py
- ipaserver/library/ipaserver_master_password.py
2018-06-21 13:26:20 +02:00
Thomas Woerner
14f975b411 ipaserver: Add support for 4.7 (4.6.90-pre2)
With IPA 4.7 bigger changes have been introduced

Changes:
- Use of timeconf and chrony instead of ntpconf and ntpd.
- New IPAChangeConf (not used in ipaserver modules)
- New check_ldap_conf form ipaclient.install.client
- custodia instance needed for ca and kra
- no_ntp defaults to yes for client installation part
- A new option ntp_pool has been introduced (set to None).
2018-06-21 13:21:10 +02:00
Thomas Woerner
86e9496ab6 ipaclient/vars/default.yml: Use python3-libselinux instead of libselinux-python
The python3 bindings should be required and not the python2 bindings as a
default.
2018-06-21 13:14:19 +02:00
Thomas Woerner
1ed9379c9c ipaclient: Fix OTP action plugin to work with python3 bindings
As the action plugin is used with the default python interpreter and
the change to python3 for FreeIPA, the use of OTP was not working anymore.

The ansible_python_interpreter is not automatically used for the module
part of the action plugin. Therefore ansible_python_interpreter needed to
be added to the action plugin call as a new var to make sure that the
module part is used with the proper python version.

Also a new import for the Python2/3 import test has been added to discover
of the server is supporting python2 or python3. The old
ansible_python_interpreter setting is saved before doing this and restored
after the one-time password has been generated on the server.
2018-06-21 13:08:44 +02:00
Thomas Woerner
4063b6caa3 ipaclient: Add support for IPA 4.7 (4.6.90-pre2)
With IPA 4.7 bigger changes have been introduced

Changes:
- Use of timeconf and chrony instead of ntpconf and ntpd.
- A new option ntp_pool has been introduced.
2018-06-21 13:04:32 +02:00
Thomas Woerner
2d6c9bb381 ipaclient/library/ipa_facts.py: Fix version_info for new pre versions
With 4.6.90 pre versions have been introduced. The version parsing in
ipa_facts broke with this as it did not know about pre versions so far.
2018-06-21 12:52:10 +02:00
Thomas Woerner
285790231a ipaclient: Use paths variables for executables used in modules
paths.KDESTROY instead of "kdestroy" and paths.GETENT instead of "getent"

Affected modules:
  roles/ipaclient/library/ipahost.py
  roles/ipaclient/library/ipajoin.py
  roles/ipaclient/library/ipanss.py
2018-06-21 12:48:24 +02:00
Thomas Woerner
ab14ce4e37 ipaserver_setup_ds: Fix tasks.create_tmpfiles_dirs call (issue#19) (2nd try)
tasks.create_tmpfiles_dirs only needs IPAAPI_USER as an argument for
version 4.5.4. For 4.5 there is no support for arguments.

IPAAPI_USER is therefore only needed for 4.5.4 in
module_utils/ansible_ipa_server.py
2018-06-21 12:00:24 +02:00
Thomas Woerner
1ecc194ca6 ipclient: Move library and action_plugins into ipaclient role directory
The directories library and action_plugins do only contain ipaclient specific
modules and plugins. Therefore these directories should be located in the
ipaclient role directory.
2018-06-21 11:34:50 +02:00
Thomas Woerner
0c942baea2 ipaserver: Fix issue with setup_dns and forwarders or no_forwarders
When forwarders list or the no_forwarders flag has been set, the
configuraiton does not reflect the setting. With no_forwarders
the preparation step of the DNS server could fail in ipaserver_prepare.

This is addressing the issue of pull request #25.
2018-06-11 15:33:08 +02:00
Thomas Woerner
d4b7d4d3e8 Merge pull request #22 from kellinm/no-change-on-python3-test
Capturing python3 check result is not a change
2018-05-18 15:37:28 +02:00
Thomas Woerner
397acc01db ipaclient: Make krb5 DNS lookup possible in cluster environments
krb5 DNS discovery was not possible in cluster environments as the server
list from groups.ipaserver was used all the time. DNS discovery is though
only used if no servers are given.

The new setting ipaclient_no_dns_lookup has been added to make sure that
DNS lookup is used in the first place and can be disabled easily with this
setting. There is also a new way to override servers per client in the
inventory file with ipaclient_servers.

Two new settings have been added:

ipaclient_no_dns_lookup (bool, default: no)
  Set to 'yes' to use groups.ipaserver in cluster environments as servers
  for the clients. This deactivates DNS lookup in krb5.

ipaclient_servers (list of strings, default: undefined)
  Manually override list of servers for example in a cluster environment on
  a per client basis. The list of servers is normally taken from from
  groups.ipaserver in cluster environments.
2018-05-18 15:06:53 +02:00
Thomas Woerner
3e9568e39e ipaclient: Fix krb5 DNS lookup and servers
The krb5 DNS lookup settings krb5_dns_lookup_realm and krb5_dns_lookup_kdc
ans also the servers have not been set properly set if no server has been
specified and discovery succeeded. This has been fixed.

This fixes issue #23.
2018-05-18 14:38:27 +02:00
Kellin
75cd130d4a Capturing python3 check result is not a change
- Do not register a change in the playbook run when registering the
  variable checking for whether or not Python 3 imports work

Signed-off-by: Kellin <kellin@retromud.org>
2018-04-10 21:01:13 -04:00
Thomas Woerner
53d984f1e8 New role for ipareplica installation
The support for external cert files is not complete yet.

Please have a look at the example inventory file inventory/hosts.replica and
also the install and uninstall playbook files install-replica.yml and
uninstall-replica.yml
2018-04-04 16:19:37 +02:00
Thomas Woerner
71ec4d4e2a Incorporate "Use os.path.isfile() and isdir()" from freeipa upstream
b29db07c3b3d8937f53684fdbba985fec525d69d by Christian Heimes

    Replace custom file_exists() and dir_exists() functions with proper
    functions from Python's stdlib.

    The change also gets rid of pylint's invalid bad-python3-import error,
    https://github.com/PyCQA/pylint/issues/1565
2018-04-04 15:11:34 +02:00
Thomas Woerner
50bbd82338 ipaserver_setup_ds: Fix tasks.create_tmpfiles_dirs call (issue#19)
tasks.create_tmpfiles_dirs does not support options for FreeIPA 4.5
2018-02-21 17:35:40 +01:00
Thomas Woerner
9d6cd7acac ipaserver_{test,prepare}: Add kasp_db_file to options
options.kasp_db_file is used in dns.install_check if options.dnssec_master
is enabled. kasp_db_file defauts to None and is only a supported option in
the post deployment ipa-dns-install script. Therefore it is suffient to
set it to None.
2018-02-09 19:43:46 +01:00
Thomas Woerner
4f897d37f5 Server: Configure firewalld by default, new switch: ipaserver_no_firewalld
A new section has been added to configure firewalld automatically as the
last step of the server installation.

A new switch has been added to be able to turn firewalld configuration off:
ipaserver_no_firewalld. It defaults to no.
2018-02-09 16:57:14 +01:00
Thomas Woerner
3e03d7f44d ipaclient/tasks/install: Fix client installation on master within server role
The client role is used also while installing the server. There has been an
issue where the server installation has not been complete because of a
playbook termination in the client.

This has been fixed and the client and also the server are fully configured
in the server installation.
2018-02-09 16:56:53 +01:00
Thomas Woerner
aaea687a3b Added GPLv3 COPYING file, fixed licenses in ipaconf, krb5 and sssd roles
The roles ipaconf, krb5 and sssd have been using GPLv2+ in the license meta
information while everything else is GPLv3. Therefore the license meta
information has been changed to GPLv3.
2018-02-09 16:33:53 +01:00
Scott Poore
f3ef5f5fc8 server install force and allow_zone_overlap fixes
force and allow_zone_overlap options were missing from a couple places.

Signed-off-by: Scott Poore <spoore@redhat.com>
2018-02-08 18:47:19 -06:00
Thomas Woerner
583c951a18 ipaserver/tasks/install.yml: Finally use include_role for client setup on master 2018-01-31 23:46:47 +01:00
Thomas Woerner
9adfb2f5a0 ipaserver/tasks/uninstall.yml: Fix error for using uninstall on not installed server 2018-01-31 23:46:43 +01:00
Thomas Woerner
986ac80a60 ipaserver: End play if server is already configured or client is configured 2018-01-31 23:46:41 +01:00
Thomas Woerner
4e2b687723 ipaserver/tasks/install.yml: Add no-log got master password generation again 2018-01-31 23:46:39 +01:00
Thomas Woerner
3dc9ab9999 ipaserver: Add no_host_dns for ipaserver_test
This is needed to fix the installation without configuring the dns server in
the IPA server.
2018-01-31 23:46:37 +01:00
Thomas Woerner
4697a0326d ipaclient/tasks/main.yml: Fix undefined ipaclient_packages error with include_role
The relative import of the distribution specific vars files requires to use
is not working. {{ role_path }} needs to be used to force the load of the
proper files.
2018-01-31 23:46:36 +01:00