600 Commits

Author SHA1 Message Date
Thomas Woerner
990da8341f ipaclient vars: Renamed ipaclient_package to ipaclient_packages
The rename was needed to be able to have more than one package in the list
of required packages.

For RHEL-7.3 it has been needed to add ipa-admintools to have /usr/bin/ipa
available. libselinux-python has been added for all.
2017-10-04 17:22:40 +02:00
Thomas Woerner
92b824d8d2 roles/ipaclient/tasks/install.yml: ccache cleanup, new always clause
Add big block has been added that contains all steps where the ccache is
created an used. With the block it is possible to add an always clause to
remove the ccachae also in the error case. The cleanup of the ccache is
also done in the beginning to make sure that no ccache leftover will be
used.
2017-10-02 18:54:23 +02:00
Thomas Woerner
895a887701 Add support for Python3 based freeipa versions (F-27+), make Python3 default
Add configuration for F-26, F-27 and RHEL-7 to be Python2 based
2017-10-02 17:12:15 +02:00
Thomas Woerner
cd5b7711f6 roles/ipaclient/tasks/install.yml: Better message for cleanup and stop 2017-09-25 15:59:04 +02:00
Thomas Woerner
6dc469fdb8 library/ipaapi.py: Add call to api to get subject base form server
The subject base generated in discovery is only a guess and might have been
changed by the admin at installation process. Therefore it is needed to
get this from the server.

subject_base has been added as a new return value.

Use subject base form ipaapi in roles/ipaclient/tasks/install.yml instead of
guessed value from ipadiscovery.
2017-09-25 15:54:21 +02:00
Thomas Woerner
375500df37 roles/ipaclient/tasks/install.yml: Set no_log:yes for OTP generation and usage 2017-09-19 18:08:24 +02:00
Thomas Woerner
4918ac508f Renamed ipaclient_{principal,password} to ipaadmin_{principal,password}
This has been done to make clear that these are admin settings and to make
these settings consistent to ipaadmin_keytab.
2017-09-19 17:54:30 +02:00
Thomas Woerner
8152ecf31e roles/ipaclient/tasks/install.yml: Use ipajoin also if force_join is set 2017-09-19 15:16:24 +02:00
Thomas Woerner
aa2048aef9 roles/ipaclient/tasks/install.yml: Drop ipaclient_keytab empty string test 2017-09-19 10:00:17 +02:00
Thomas Woerner
7428a47977 roles/ipaclient/tasks/install.yml: Fix use of wrong quotes 2017-09-19 09:57:24 +02:00
Thomas Woerner
edab4274bb roles/ipaclient/tasks/install.yml: Properly test ipaclient_keytab for join 2017-09-18 18:23:33 +02:00
Thomas Woerner
ed91cc1d28 New ipaclient_allow_repair switch
When allow_repair is enabled, then the playbook will continue for an
already joined host. The remaining steps ipaconf, ipasssd, krb5, ipaapi,
ipanss and ipaextras will be redone.

If allow_repair is disabled, then the meta module will be
used with the end_play option to stop the processing of the playbook
without an error.
2017-09-18 18:00:41 +02:00
Thomas Woerner
7ab7494ed2 roles/ipaclient/tasks/install.yml: Add ipatest, disable otp and join if ipatest.krb5_keytab_ok
If a working krb5.keytab has been detected on the host then use_otp will be
disabled and join will not be called. This is done to preserve the keytab
entry in the host entry on the server.

Enforcing the creation of a one-time-password will result in a host-disable
call for the host entry. This will remove an existing keytab and password from
the entry.
2017-09-18 17:52:46 +02:00
Thomas Woerner
b19db21cf3 roles/ipaclient/tasks/install.yml: Test for empty ipaclient_principal and ipaclient_keytab 2017-09-18 17:39:35 +02:00
Thomas Woerner
8daef41e0a roles/ipaclient/tasks/install.yml: Do not set principal with keytab for join 2017-09-15 18:56:09 +02:00
Thomas Woerner
6dcecdc296 roles/ipaclient/tasks/install.yml: Use ipaadmin_keytab for admin keytab
The use od ipaclient_keytab for ipahost is not correct as the admin keytab
needs to be used here.
2017-09-15 18:55:30 +02:00
Thomas Woerner
f366fb5270 roles/ipaclient/tasks/install.yml: Purge realm from keytab also needed for force_join
For force_join it is also needed to purge the realm information from the
keytab, otherwise new entries will be added with every join.
2017-09-15 15:39:07 +02:00
Thomas Woerner
4b2b6751b2 roles/ipaclient/tasks/install.yml: Purge realm from keytab after otp generation
If a otp has bene generated it is needed to purge the realm from an exising
host keytab. If there is no host keytab or if the keytab is not containing
information about the realm, ipa-rmkeytab will fail and these two errors are
ignored.
2017-09-15 15:08:22 +02:00
Thomas Woerner
7eb98eaaef roles/ipaclient/tasks/install.yml: Fix principal/keytab check, set default principle early 2017-09-15 14:29:17 +02:00
Thomas Woerner
db12c0959a library/ipajoin.py: Fix principal usage with otp
With otp usage the user supplied principal may not be used for join.
2017-09-15 14:06:39 +02:00
Thomas Woerner
6a9bc0df82 roles/ipaclient/tasks/install.yml: Fix typo in comment 2017-09-15 12:54:32 +02:00
Thomas Woerner
609f12c4fc roles/ipaclient/tasks/install.yml: Set default principal if not set
If use_otp is not enabled, then the principal will be set to "admin" after
the discovery has been done. If use_otp is enabled, then the princial will
be set to "admin" after the join has been done - as admin will not match
with the otp.
2017-09-15 12:52:05 +02:00
Thomas Woerner
fd88ba1c7d roles/ipaclient/tasks/install.yml: Checks for principal, keytab and password 2017-09-15 12:51:40 +02:00
Thomas Woerner
2d95d0df95 roles/ipaclient: New ipaclient_use_otp setting to force otp usage
The use of otp can be forced to not transfer the admin password while setting
up the ipa client. Only the one-time-password will be transferred to the
client machine.

ipaclient_password will be overwritten by the otp password.
2017-09-15 12:49:22 +02:00
Thomas Woerner
c088e3f9a6 library/ipajoin.py: Add kinit_attempts default value
Also: Add ipaclient_kinit_attempts default value to
roles/ipaclient/defaults/main.yml
2017-09-15 12:26:03 +02:00
Thomas Woerner
e7520a5b1f roles/ipaclient/tasks/install.yml: Tew additional checks for password, keytab and otp 2017-09-15 10:09:28 +02:00
Thomas Woerner
0b4aec7b6a roles/krb5: Compatibility for ipa 4.4 and later
New variables have been added (undefined by default):
  krb5_dns_canonicalize_hostname
  krb5_pkinit_anchors
  krb5_pkinit_pool

These are set according to the ipa version requirements. See
roles/ipaclient/tasks/install.yml
2017-09-15 09:40:08 +02:00
Thomas Woerner
a572dfb69e library/sssd.py: Renamed to ipasssd 2017-09-15 09:40:08 +02:00
Thomas Woerner
0c5905fddb library/ipadiscovery.py: Add ca_cert_file argument for discovery 2017-09-15 09:40:08 +02:00
Thomas Woerner
4789595428 library/fstore.py: Renaed to ipafstore 2017-09-15 09:40:08 +02:00
Thomas Woerner
20538cc86e New module fstore to backup files using IPA client sysrestore
- Backup ipa default conf
- Backup krb5.conf
2017-08-31 18:45:28 +02:00
Thomas Woerner
893e32b7c6 roles/ipaclient/defaults/main.yml: Remove default values for some vars
This is needed to be able to use defined and undefined checks.
2017-08-31 17:44:57 +02:00
Thomas Woerner
ba1e5c210f roles/ipaclient/tasks/install.yml: Replace ipaserver_ by ipaclient_ 2017-08-31 17:36:47 +02:00
Thomas Woerner
5198eb5304 roles/ipaclient/tasks/install.yml: Use new roles and modules
The sssd role has been deactivated in favor of the new sssd module, because the module is able to adapt an existing configuration.
2017-08-30 14:45:01 +02:00
Thomas Woerner
d10d078a42 New role to configure ipa default.conf 2017-08-30 14:35:39 +02:00
Thomas Woerner
5f17e9a778 roles/krb5: New krb5_no_default_domain setting 2017-08-30 14:31:05 +02:00
Thomas Woerner
e65ba14e52 roles/sssd: Fixed several small defects, added libselinux-python to sssd_packages 2017-08-30 14:28:34 +02:00
Thomas Woerner
a484e5b2d2 roles/ipaclient/defaults/main.yml: ipaclient_ntp should default to no 2017-08-30 14:27:31 +02:00
Thomas Woerner
5cfcccd616 library/ipajoin.py: Doc updates, renamed ca_certs_file
Documentation for domain, principal, keytab, ca_cert_file and kinit_attempts
has been added.

ca_certs_file has been renamed to ca_cert_file as it is used in
ipa-client-install.
2017-08-24 12:54:37 +02:00
Thomas Woerner
18cc39dd30 roles/ipaclient/tasks/install.yml: Test code for krb5 and sssd 2017-08-24 12:39:01 +02:00
Thomas Woerner
bd8e23f211 New role for krb5 2017-08-24 12:38:15 +02:00
Thomas Woerner
3ae2a51c08 New sssd role 2017-08-24 12:36:51 +02:00
Thomas Woerner
44e4ee7459 library/ipajoin.py: New module for ipajoin
The module is doing the important part of the code in ipa-client-install
to be able to use ipa-join on the client. get_ca_certs* from client.py are
used as a temporary solution.
2017-08-24 12:33:23 +02:00
Thomas Woerner
4dea948fda roles/ipaclient/tasks/install.yml: Install IPA client early
IPA client imports are needed for discovery
2017-08-24 12:20:54 +02:00
Thomas Woerner
0246ad0079 roles/ipaclient/defaults/main.yml: Remove unused ipaclient_servers 2017-08-24 12:19:51 +02:00
Thomas Woerner
07a15c56e8 library/ipadiscovery.py: New module for ipa discovery
The module is doing the same discovery that ipa-client-install is doing
internally. The results are saved into a structure named ipadiscovery for
the ansible module.

The discovery module is needed to be able to not depend on the definition
of the ipaservers group for example to get otp passwords, to be able to
join and to configure sssd and other services corretly.
2017-08-23 20:40:46 +02:00
Thomas Woerner
97be0612fb library/ipaclient.py: servers needs to be a list
More than one server could be specified
2017-08-23 20:38:51 +02:00
Thomas Woerner
95c38d169d New ipaclient options: force_join, kinit_attempts, ntp and mkhomedir 2017-08-18 10:02:01 +02:00
Florence Blanc-Renaud
38d7223376 Modify ipahost module: the authentication is done locally on the controller
node and the credential cache is copied to the managed node

ipahost module is also using facts gathered from the server to find the
domain and realm.
2017-08-10 16:54:44 +02:00
Florence Blanc-Renaud
09f45e4acd Ansible for IPA 2017-07-03 09:55:23 +02:00