Commit Graph

204 Commits

Author SHA1 Message Date
Thomas Woerner
de039aa0c8 ipaclient: Use ipaclient_all_ip_addresses instead of ipahost_all_ip_addresses (2)
This setting had the wrong and unsed prefix ipahost. THis has been fixed and
the proper prefix ipaclient is now used.

The change in ipaclient/defaults/main.yml was missing from the first commit
b5d6dc00d2
2019-04-03 21:30:15 +02:00
Thomas Woerner
5d79745e88 ipareplica_test: Deactivate adtrust_imported and kra_imported tests
These test are failing because there is no adtrust_imported and
kra_imported setting yet in ansible_ipa_replica.
2019-04-03 19:16:21 +02:00
Thomas Woerner
7a2d2c5236 ipareplica_prepare: Properly fail if replica_conn_check failed
If replica_conn_check failed a back trace was printed instead of a proper
failure in ansible. Thias has been fixed.
2019-04-03 19:16:21 +02:00
Thomas Woerner
44ce7263de ipareplica: Fix DNS setup issues
The configuration of DNS failed because of missing DNS settings in the
ipareplica_prepare and ipareplica_setup_dns.

Some fixed settings for use with DNSInstallInterface have been added
to ansible_ipa_replica:

options.dnssec_master = False
options.disable_dnssec_master = False
options.kasp_db_file = None
options.force = False

Fixes: #58 (install-replica fails: reverse_zones seems to be empty)
Fixes: #63 (ipareplica_setup_dns fails)
2019-04-03 19:15:26 +02:00
Thomas Woerner
f33d234d5a ansible_ipa_server: Remove user_input, add missing DN and ntpinstance
Removed unused user_input import from ipapython.ipautil. Added import
of DN from ipapython.dn. Set ntpinstance to None if timeconf or
sync_time could not be imported on older FreeIPA releases.
2019-04-03 19:00:53 +02:00
Thomas Woerner
b6a562b818 ipaserver: Use ipaserver_install_packages for ipaclient deployment part
Use ipaserver_install_packages to enable or disable package installation
for the client deployment part with ipaclient role.
2019-04-03 19:00:53 +02:00
Thomas Woerner
995864cf52 ipareplica: Use ipareplica_install_packages for ipaclient deployment part
Use ipareplica_install_packages to enable or disable package installation
for the client deployment part with ipaclient role.
2019-04-03 19:00:53 +02:00
Thomas Woerner
b8885c8dfd ipareplica_enable_ipa: DO not create unused replica config
Replica config is not needed and there fore has been removed.
2019-04-03 19:00:53 +02:00
Thomas Woerner
69f0f1e59c ipareplica_setup_ds: Cleanup of unused dns settings in options
The dns settings in options have not been used and also not provided to
the module in the tasks file. Therefore these settings shoul dbe removed.
2019-04-03 19:00:53 +02:00
Thomas Woerner
cc942cb932 ipareplica_install_ca_certs: Cleanup of unused dns settings in options
The dns settings in options have not been used and also not provided to
the module in the tasks file. Therefore these settings shoul dbe removed.
2019-04-03 19:00:42 +02:00
Thomas Woerner
9bfd76a60f ipareplica_create_ipa_conf: Cleanup of unused dns settings in options
The dns settings in options have not been used and also not provided to
the module in the tasks file. Therefore these settings shoul dbe removed.
2019-04-03 18:55:32 +02:00
Thomas Woerner
88f5a68e10 ipareplica: Replace ipaserver_master_password, remove ipaserver_setup_ntp
ipaserver_master_password and ipaserver_setup_ntp have been linked from
the ipaserver role before. With the move of the module_utils parts to the
specific role locations the use of ipaserver modules leads to the missing
dependency ansible_ipa_server, that is now only available in the server
role.

The ipaserver_master_password module has been replaced by the ipareplica
specific ipareplica_master_password module. The ipaserver_setup_ntp module
has been removed as the time related changes for replica are done in the
client install part.

Fixes: #59 (Module is missing interpreter line)
2019-04-03 18:37:50 +02:00
Thomas Woerner
2113c79111 ipa[client,replica,server]: Make sure that installer logs are created
The installer logs have not been created using the ansible ipaclient,
ipareplica and ipaserver roles. This has been fixed and the installer
logs are created now.
2019-04-03 14:20:18 +02:00
Thomas Woerner
b5d6dc00d2 ipaclient: Use ipaclient_all_ip_addresses instead of ipahost_all_ip_addresses
This setting had the wrong and unsed prefix ipahost. THis has been fixed and
the proper prefix ipaclient is now used.
2019-04-03 14:17:16 +02:00
Thomas Woerner
07a97cb83f ipaclient: Krb5 should only be configured if ipaclient_on_master is not set
Krb5 configuration was also done if ipaclient_on_master was set. This
resulted in a reverted configuration while deploying the client part in
a server deploment.
2019-04-03 14:08:45 +02:00
Thomas Woerner
4557292743 ipa[server,replica,client]: Do not try to execute tasks after the role test
The role test is executed in the ipa[server,replica,client] roles first.
These tests are usable in the Ansible test mode, but the folllowing steps
in the task list are not. Therefore the blocks following the tests are
limited to not being executed in test mode.
2019-03-26 14:22:26 +01:00
Thomas Woerner
82588026bf python_2_3_test: Make sure that python_2_3_test is also executed in test mode
python_2_3_test needs to be executed also in test mode to make sure that the
follwing ipa[server,replica,client]_test modules could be executed also in
test mode.
2019-03-26 14:19:56 +01:00
Thomas Woerner
9a9138150b ipaserver_test: Do not mark ipaserver_test as changed.
The changed flag is not set to True any more to make sure that the try
to deploy an already deployed server again will not result in an error.
2019-03-26 14:17:05 +01:00
Thomas Woerner
88cbbf6309 ipareplica_test: Dop not fail, but end play if replica is already installed
Up to now the try to deploy an already deployed replica resulted in an
error. Now this ends in an end play and no error is reported.
2019-03-26 14:12:17 +01:00
Thomas Woerner
7ce09b2cc9 python_2_3_test: Add result_ prefix to registered result from py3test.py script
For consitency the result_ prefix has been added to the registered result
of the py3test.py script.
2019-03-26 14:03:31 +01:00
Thomas Woerner
5b770ae135 New ipareplica_enable_ipa: Use of ipaserver_enable_ipa is not possible anymore
With the changes for IPA enablement in the replica installer it is not
possible anymore to enable the IPA server in the same way as in the
server deployment.

The new module ipareplica_enable_ipa has been added and the link for
ipaserver_enable_ipa has been removed.
2019-03-26 13:39:36 +01:00
Thomas Woerner
98a6e0a78c ipareplica_setup_adtrust: Fix setup_ca, master_host_name and ldap2 backend connection
The parameter config_setup_ca has been renamed to setup_ca and added to
options. master_host_name has been added to config. Also a call for
api.Backend.ldap2.connect has been added to make sure that the backend is
connected.
2019-03-26 13:39:36 +01:00
Thomas Woerner
ebce1ace1a ipareplica_setup_krb: Use inspect on install_krb
The promote argument has been dropped with the final removal of domain
level 0 support in version 4.7.1. The fstore argument has been added
with the 4.7.1 version also.
2019-03-26 13:39:36 +01:00
Thomas Woerner
5f6efc32d2 ipareplica_setup_http: Use inspect on install_http
The promote argument has been dropped with the final removal of domain
level 0 support in version 4.7.1. The fstore argument has been added
with the 4.7.1 version also.
2019-03-26 13:39:36 +01:00
Thomas Woerner
9fb32b2322 ipareplica_setup_ds: Use inspect on install_replica_ds and install_dns_records
The promote argument has been dropped with the final removal of domain
level 0 support in version 4.7.1. The fstore argument has been added
with the 4.7.1 version also.
2019-03-26 13:39:36 +01:00
Thomas Woerner
b8dd597a69 ansible_ipa_replica: Cleaned up double and unused imports
Double imports and also the import of create_replica_config from
ipaserver.install.installutils have been removed. create_replica_config
is not used because the use of domain level 0 is not supported.
2019-03-26 13:39:36 +01:00
Thomas Woerner
475df2bf5e ipareplica_test: Added ntp_server, ntp_pool and some ntp related tests
ntp_server and ntp_pool are now provided to ipareplica_test. A conflict
test with no_ntp has been added from the normal installer.

Also added are references to options.password and options.dm_password, but
these are commented out and not used or provided to the module.

Proper ntp_servers and ntp_pool tests are needed still.
2019-03-26 13:39:36 +01:00
Thomas Woerner
a441df090b ipareplica_prepare: Use MIN_DOMAIN_LEVEL instead of DOMAIN_LEVEL_1 in checks
With FreeIPA 4.7.0 there is no support for domain level 0 anymore, the
check for the minimal domain level should use MIN_DOMAIN_LEVEL instead of
DOMAIN_LEVEL_1.
2019-03-26 11:42:15 +01:00
Thomas Woerner
1df12a614b ipareplica py3test: Try to import promote_check if install_check is not defined
Since FreeIPA version 4.7.1 there is no install_check defined anymore in
ipaserver.install.server.replicainstall.
2019-03-26 11:38:44 +01:00
Thomas Woerner
059eae4717 ipaclient_test: Added error message to ScriptError calls only using rval
The use of ScriptError without an error message but with rval resulted in
very limited information in ansible. The error messages from logger.error
calls have have added to these ScriptError raises.
2019-03-26 11:34:07 +01:00
Thomas Woerner
3251d0acd4 ipaclient/tasks/install.yml: Removed empty line in ipaclient_setup_sssd section
Removed addtional empty line in ipaclient_setup_sssd sectio
2019-03-26 11:08:12 +01:00
Thomas Woerner
c7fd2cacf3 ipaclient/tasks/install.yml: Removed default(omit) for bool variables
default(omit) is not needed for bool values, as these need to be set either
way.
2019-03-26 11:05:30 +01:00
Thomas Woerner
90b101310a module_utils/ansible_ipa_client: Deactivate __getattr__ in installer_obj
The __getattr__ method in installer_obj was used for debugging to make
sure that all needed settings in the installer object have been set.
2019-03-26 09:56:49 +01:00
Thomas Woerner
314010c043 ipaclient_test: Remove debugging warning output
A remain from debugging in ipaclient_test has been removed.
2019-03-26 09:43:11 +01:00
Thomas Woerner
fdb44fc2c4 ipaclient_get_otp: Fix password encoding
Deploying a client with one-time password use was failing in latest tests
using ansible 2.7 and FreeIPA 4.7 because of an encoding problem.
2019-03-25 19:52:40 +01:00
Thomas Woerner
a6ee0d0756 ipaclient: End install if already installed and no allow_repair and force_join
If the client is already installed and the allow_repair and force_join
options are not set end the playbook processing. This is useful if an
inventory file contains existing and new machines.
2019-03-25 19:51:58 +01:00
Thomas Woerner
099317fe9c New ipaclient_setup_krb5: Use ipaclient_setup_krb5 instead of ipa-krb5 role
The advantage of this is that the krb5 configuration is created in the same
way as in the normal installers. The same functionality as in the normal
installers is used in ipaclient_setup_krb5. There is no need to adapt the
ipa-krb5 role or the the ask file for changes in how the krb5 configuration
is done. Additionally ipaclient_force is now a supported parameter as
it is in the normal installer.

New config option:

ipaclient_force

The variable has been added to ipaclient/defaults/main.yml.
2019-03-25 16:53:32 +01:00
Thomas Woerner
b942661788 New ipaclient_ipa_conf: Use ipaclient_ipa_conf instead of ipaconf role
The advantage of this is that the ipa default configuration is created in
the same way as in the normal installers. The same functionality as in the
normal installers is used in ipaclient_ipa_conf.
2019-03-25 16:48:29 +01:00
Thomas Woerner
d0ba53153e ipaclient_setup_ssh: Keep no_ for prefix for settings, use ssh_trust_dns
The no_ prefix for the ssh and sshd settings has been added back. The
naming of the settings should be the same all over the ipcalient role.
The exception is sssd here as it has been deprected and is used from
ipaclient_test.

The name for the setting ssh_trust_dns has been fixed to the command line
option name and not the internl optinos name.
2019-03-25 15:04:36 +01:00
Thomas Woerner
2983d4e7b3 ipaclient_setup_sssd: Update and cleanup
ipaclient_setup_sssd is now using configure_sssd_conf from
ipaclient/install/client.py instead. This simplified the module a lot
and also adds more configuratino options for sssd.

These are new config options supported by ipaclient_setup_sssd:

ipaclient_no_sudo
ipassd_fixed_primary
ipassd_permit
ipassd_enable_dns_updates
ipassd_no_krb5_offline_passwords
ipassd_preserve_sssd

These variables have been added to ipaclient/defaults/main.yml.
2019-03-25 14:04:34 +01:00
Thomas Woerner
c5ce754850 ipaclient_test: More tests from ipaclient installer, updated ansible_ipa_client
The ipaclient_test module was not doing all tests that should be done
with the provided settings. All tests from ipaclient installer parts
are now part of ipaclient_test. There are some minor changes though to
make sure that the repair mode could still be used.

ansible_ipa_client bindings have been updated to fullfill new needs.
2019-03-25 13:56:18 +01:00
Thomas Woerner
bf1f8bff5c ipaclient/library/ipaclient_setup_ntp: Fix import of ansible_ipa_client
The import line of ansible_ipa_client was not correct and used a test
version of the binding that is not possible anymore due to the move of
the module_utils directories into the specific role locations.
2019-03-25 13:33:36 +01:00
Thomas Woerner
61862820e0 ipaclient: New module ipaclient_setup_ntp, dropped ipaclient_ntp setting
The new module ipaclient_setup_ntp to configure and sync time with the NTP
server has been added. The irregular setting ipaclient_ntp has been removed.

The ipaclient_setup_ntp module is using either the new sync_time call or
for compatibility with older FreeIPA versions synconce_ntp.

The reference for ipaclient_ntp in REPLICA.md has been removed also.

This also fixes #55.
2019-03-21 18:20:50 +01:00
Thomas Woerner
4b2fc33b35 ipaclient: Replace extras module with ssh, automount, firefox and nis modules
ipaclient_extras could configure several things internally according to
provided settings. These have been ssh, sshd, automount, firefox an also
nis. The ssh and sshd configuration is now plocated in ipaclient_setup_ssh,
the automount configuration in ipaclient_setup_automount, the firefox
configuration in ipaclient_setup_firefox and the nis configuration in
ipaclient_setup_nis.

The following additional settings have been added to
roles/ipaclient/defaults/main.yml to provide the same configruation options
as ipa-client-install does:

ipaclient_no_ssh: no
ipaclient_no_sshd: no
ipaclient_no_nisdomain: no
ipaclient_configure_firefox: no
2019-03-21 15:26:40 +01:00
Thomas Woerner
7c378d9c4d ipaclient role: Fix naming of modules, action_plugins and registered vars
The naming in the ipaclient role has not been following the naming scheme
and conventions used in the ipaserver and ipareplica roles. Also registered
results of modules and commands have not been unsing the result_ prefix as
in the other roles. All this has been fixed and the naming is consistent
now.

These are the renames:

ipahost -> ipaclient_get_otp
ipaapi -> ipaclient_api
ipaextras -> ipaclient_extras
ipafixca -> ipaclient_fix_ca
ipafstore -> ipaclient_fstore
ipa_facts -> ipaclient_get_facts
ipahost -> ipaclient_get_otp
ipajoin -> ipaclient_join
ipanss -> ipaclient_setup_nss
ipasssd -> ipaclient_setup_sssd
ipadiscovery -> ipaclient_test
ipatest -> ipaclient_test_keytab
2019-03-21 13:52:34 +01:00
David Sastre Medina
9504c71214 Move module_utils to role specific locations 2019-02-20 11:05:59 +01:00
Thomas Woerner
a28378396f ipa[server,replica]: Renamed X_no_firewalld to X_setup_firewalld
The use of the _no_ prefix was not good and has been fixed now.

The X_setup_firewalld settings default to yes.
2019-02-12 13:50:07 +01:00
Thomas Woerner
77d0a1067a ipa[server,replica,client]: New setting X_install_packages
With these settings for server, replica and client it is possible to skip
package installation. This is for example useful if the packages are already
installed. The settings default to yes

The setting ipareplica_no_package_install has been removed.
2019-02-12 13:50:04 +01:00
Alessandro De Blasis
3c952cdb16 Fixes #51 upstream 2019-02-01 13:15:44 +00:00
Thomas Woerner
e6cf0e1578 ipareplica: Make ipaserver_enable_ipa module working for ipareplica role
The ipareplica role is reusing the ipaserver_enable_ipa module. This module
needed some extensions on the server to enable the delayed services and
also to dump DNS configuration (see commit a128726).
For replica it is not needed to dump the DNS configuration, therefore it is
simply possible to set detup_dns to no to make this module also working
for ipareplica.
2018-11-26 15:56:00 +01:00