404 Commits

Author SHA1 Message Date
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
Thomas Woerner
3c4e68ef10 ipaclient/tasks/install.yml: Fix possible ipajoin.already_joined undefined issue 2018-01-31 23:46:33 +01:00
Thomas Woerner
ceb4224afe ipaclient/tasks/install.yml: Support client usage in server role
The server role has different setting names:

- groups.ipaserver: groups.ipaservers
- ipaserver_domain: ipaclient_domain
- ipaserver_realm: ipaclient_realm

Both need to be supported to be able to sue the client role within the server
role, but also standalone.
2018-01-31 23:46:31 +01:00
Thomas Woerner
ecdbcea1e8 ipaserver: Fix DNS installation forward policy and DNSSEC validation
forward_policy needs to be None for the DNS check for proper initialization
if the user is not providing another forward_policy value. forward_policy will
be set in the DNS check.

no_dnssec_validation is enabled in the DNS check if the forwarders do not
provide DNSSEC validation. Therefore this needs to be handed over to the dns
installation later on.

New return values for forward_policy and no_dnssec_validation have been added
to the ipaserver_test module.
2018-01-30 10:25:56 +01:00
Thomas Woerner
80d503a21c ipaserver_prepare: Add missing no_dnssec_validation setting 2018-01-29 18:09:13 +01:00
Thomas Woerner
21eea732cc ipaserver/tasks/install.yml: Properly order settings for ipaserver_prepare 2018-01-29 18:05:58 +01:00
Thomas Woerner
55d9ca8215 ipaserver: Use result_ prefix for results 2018-01-29 17:56:30 +01:00
Thomas Woerner
bc253e7233 ipaserver: Use ipaclient_ prefix for client settings
The client settings are:

ipaclient_mkhomedir
ipaclient_no_ntp
ipaclient_ssh_trust_dns
ipaclient_no_ssh
ipaclient_no_sshd
ipaclient_no_dns_sshfp
2018-01-29 17:46:53 +01:00
Thomas Woerner
9faea32375 ipaserver: Renamed ipaserver_*_password
ipaserver_password has been renamed to ipaadmin_password
ipaserver_dm_password has been renamed to ipadm_password
2018-01-29 17:40:59 +01:00
Thomas Woerner
1bebc6c4e9 ipaserver/library/ipaserver_master_password.py: Renamed name of password return
With using the name password for the password return it will be hidden
automatically and an error message will still be visible.
2018-01-29 17:35:24 +01:00
Thomas Woerner
d84a199345 roles/ipaserver/tasks/install.yml: Remove test section remain 2018-01-29 17:33:35 +01:00
Thomas Woerner
7180d1beff ipaclient,ipaserver: Better names for package tasks 2018-01-29 17:30:11 +01:00
Thomas Woerner
4228ae7d80 ipaserver: Drop unused test file install_cache 2018-01-29 17:22:46 +01:00
Thomas Woerner
cce86d09ef ipaserver: Drop ipaserver_allow_repair
There is no way to repair a server installation like it is possible with a
client.
2018-01-29 17:22:25 +01:00
Thomas Woerner
a0040ee821 ipaserver/library/ipaserver_prepare.py: Add missing allow_zone_overlap 2018-01-28 11:49:38 +01:00
Thomas Woerner
d8c3d34369 ipaserver/library/ipaserver_test.py: Use check_zone_overlap directly 2018-01-28 11:48:40 +01:00
Thomas Woerner
3edc1bedca Make ipaserver role working with ipa 4.5(.4) 2018-01-28 11:46:31 +01:00
Thomas Woerner
c5462d4aac roles/ipaserver/library/ipaserver_test: Return dns.ip_adresses and dns.reverse_zones
These global variables are initialized in the dns module in the
dns.install_check function. The settings are needed to be able to do a
proper dns setup in the ipaserver_setup_dns ansible module.
2017-12-08 13:39:36 +01:00
Thomas Woerner
e215b67dbc module_utils/ansible_ipa_server.py: New function ansible_module_get_parsed_ip_addresses
This methods creates a list of ipautil.CheckedIPAddress from the provided
ip string list.
2017-12-08 13:36:26 +01:00
Thomas Woerner
d009b80621 library/ipadiscovery: Add time synchronization calls
Attempt to sync time if on_master is not set and no_ntp is not set: At
first with given or dicovered time servers. If no ntp servers have been
given or discovered, then with the ipa server.

New parameters:
  on_master:
    description: IPA client installation on IPA server
    required: false
    default: false
    type: bool
    default: no
  ntp_servers:
    description: List of NTP servers to use
    required: false
    type: list
    default: []
  no_ntp:
    description: Do not sync time and do not detect time servers
    required: false
    default: false
    type: bool
    default: no

The ntp_servers output parameter is now always an empty list if on_master
or no_ntp is set.
2017-12-06 12:53:19 +01:00
Thomas Woerner
120786672e library/ipadiscovery: Drop unused check parameter 2017-12-06 12:52:46 +01:00
Thomas Woerner
a7e78597c6 Add support for on_master flag
This is needed to be able to use ipaclient role in the server role
2017-12-06 12:46:57 +01:00
Thomas Woerner
d2d4d95a5a Remove test remains from new ipasever role 2017-12-01 13:27:56 +01:00
Thomas Woerner
079049fa66 New role for ipaserver installation
The support for external cert files is not complete yet.
2017-12-01 13:24:01 +01:00
Thomas Woerner
86323feb80 roles/ipaclient/tasks/install.yml: Allow to specify different hostname
ipaclient_hostname needs to be specified in the inventory file for the hosts
where the name needs to get changed.

Example:
192.168.1.1 ipaclient_hostname=ipaclient1.mine.local

The option should not be specified in [ipaclients:vars] as all hosts would
get the same name.
2017-11-09 13:20:44 +01:00
Thomas Woerner
bb603fbd9f roles/ipaclient/tasks/uninstall.yml: No need to use python3 test for uninstall 2017-11-09 13:19:58 +01:00
Thomas Woerner
7b51df6c33 roles/ipaclient/tasks/[un]install.yml: Use better formatting for commands 2017-11-09 13:19:08 +01:00
Thomas Woerner
11bf327c64 roles/ipaclient/defaults/main.yml: Do not use false string for bool values 2017-11-09 13:17:42 +01:00
Thomas Woerner
d8ba096eb9 New global ansible_ipa_client utils module
With ansible 2.3.1 it is possible to have one place as an additional utils
module to do all the needed steps to be able to generate the environment for
new and older ipa versions.

The library modules are now a lot smaller.

The minimal ansible version has been increased to 2.3.1.

In the future it might now also be possible to have a special
ansible_ipa_client version for ipa < 4.4 in this utils module.
2017-11-09 13:16:28 +01:00
Thomas Woerner
fb047d7e4e Merge pull request #4 from flo-renaud/simplify_uninstall
Simplify ipaclient uninstall
2017-10-16 14:21:53 +02:00
Thomas Woerner
e3ae3476a5 roles/ipaclient/tasks/install.yml: Add keytab or password required test
The failed test result in ipahost will not be seen because of the no_log
setting to hide the generated password.
2017-10-13 16:38:45 +02:00
Thomas Woerner
8af5a26873 roles/ipaclient/tasks/install.yml: Use ipadiscovery.hostname for ipahost
The use of ansible_fqdn could result in a failure if DNS hostname and IP
do not match.
2017-10-13 16:37:10 +02:00
Thomas Woerner
ccdd43f0b5 Extended python3 test to do an additional client test
The additional client test is needed to make sure that the client is
installed for python3 usage. The ipalib test has not been sufficient.
2017-10-13 16:13:57 +02:00
Florence Blanc-Renaud
a0b8bd39e0 Simplify ipaclient uninstall
Currently ipaclient role is using the module ipaclient only for uninstallation,
and this module contains a lot of unused code.
It is simpler to directly call the command-line
   ipa-client-install --uninstall -U
and remove the ipaclient module.
2017-10-12 09:47:03 +02:00
Florence Blanc-Renaud
92d73ae2b8 Fix otp + force-join usecase
When the client already has a working keytab, use_otp is disabled. This creates
an issue when ipaclient_force_join is set, because the join module is called
with ipaadmin_principal and ipaadmin_password, but these variables may be
undefined if ipaadmin_keytab is used instead.
We should not disable OTP when force-join is specified.
2017-10-11 16:48:26 +02:00
Thomas Woerner
63fd53eb77 Use Python2/3 to detect ansible_python_interpreter
With the test it is not needed to pin down the python interpreter for ansible
modules. It is therefore possible to use a Python2 version on Fedora-27 and
a Python3 version on Fedora-26.
2017-10-10 17:20:59 +02:00
Scott Poore
2183bb68cc change pkinit_anchors to kdc-ca-bundle
In the client krb5.conf setup, a pkinit_anchors entry
was being added for pki-ca-bundle.  This should instead
be kdc-ca-bundle.

Signed-off-by: Scott Poore <spoore@redhat.com>
2017-10-05 11:46:07 -05:00
Thomas Woerner
6482a0d1c3 library/ipatest.py: Drop unused prinipal from module parameters
The principal is not used and needed in the module, therefore it got removed.
2017-10-05 10:39:43 +02:00