2675 Commits

Author SHA1 Message Date
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
fb8075c1ad library/ipadiscovery.py: Fix domain error message 2017-11-09 13:17:04 +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
9259899db5 Merge pull request #6 from flo-renaud/fixipahost_44
ipahost module: fix the module for IPA 4.4 server
2017-10-18 11:36:53 +02:00
Florence Blanc-Renaud
5b57c8b792 ipahost module: fix the module for IPA 4.4 server
The module had unused imports preventing execution with an IPA 4.4 server.
The commit removes unneeded imports, and adds documentation details.
2017-10-17 17:06:14 +02:00
Thomas Woerner
5aa9f0ec33 Merge pull request #5 from flo-renaud/clean_inventory
Remove unused inventory variables
2017-10-16 14:22:20 +02: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
46b5d0f533 library/ipanss.py: Add standard_logging_setup call to fix logger.error behaviour
If the client name is not resolvable, the call of client_dns will internally
result in a logger.error call for the failed update of the DNS records.

The call to standard_logging_setup is fixing the behaviour to bremore like
a debug call.
2017-10-13 16:32:52 +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
c0cc3d4ece Remove unused inventory variables 2017-10-12 09:21:52 +02:00
Thomas Woerner
6998dc788e Merge pull request #3 from flo-renaud/fixotp_forcejoin
Fix otp + force-join usecase
2017-10-11 17:31:07 +02:00
Thomas Woerner
a1eb56d5bf Merge pull request #2 from flo-renaud/fixdoc
Fix modules documentation and remove unused variables
2017-10-11 17:09:38 +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
Florence Blanc-Renaud
4bb1e84530 Fix modules documentation and remove unused variables 2017-10-11 16:14:36 +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
Thomas Woerner
07a831a3a4 Merge pull request #1 from spoore1/master
change pkinit_anchors to kdc-ca-bundle
2017-10-06 14:53:48 +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
d99dcbbffb library/ipajoin.py: Fixed comment for missing keytab 2017-10-05 10:42:57 +02:00
Thomas Woerner
99c0891880 library/ipajoin.py: Fixed white spaces for comments and imports 2017-10-05 10:42:35 +02:00
Thomas Woerner
ea77aa2820 library/ipatest.py: Fixed example descriptions 2017-10-05 10:41:48 +02: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
Thomas Woerner
c696ea3ebf New module ipafixca to fix a missing ca.crt file.
This is done right ipanss is used as this is failing without the ca.crt file.
2017-10-04 17:40:13 +02:00
Thomas Woerner
a6c8505938 roles/ipaclient/tasks/install.yml: New fail for missing ca.crt file 2017-10-04 17:39:37 +02:00
Thomas Woerner
b51980ee5d roles/ipaclient/tasks/install.yml: New fails, no end_play with ipajoin.changed
The new results from ipatest (krb5_conf_ok and ipa_test_ok) are now used for
additional fails to suggest to enable allow_repair.

The playbook is not ended anymore if ipajoin changed something.
2017-10-04 17:38:23 +02:00
Thomas Woerner
455f5c9811 roles/ipaclient/vars/rhel.yml: Removed unused file 2017-10-04 17:28:06 +02:00
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
c78507409c library/ipatest.py: New validation tests: krb5.conf and ipa ping
The first validation test of the krb5.keytab is now done using the system
krb5.conf file. If this test failed, then the validation will be done with
the temporary krb5.conf file.

An additionally IPA test has been added. For now this is "ipa ping" as there
seems not to be a more comprehensive validation test for proper IPA
configuration.
2017-10-04 17:13:19 +02:00
Thomas Woerner
36f941b5f5 library/ipafstore.py: Fix example to user proper module name 2017-10-04 16:54:09 +02:00
Thomas Woerner
161fd027ab library/ipaapi.py: Fixed create_db version check
create_db is requiring an additional argument for IPA version 4.4.4 still.
2017-10-04 16:52:27 +02:00
Thomas Woerner
e908ee4b52 library/ipatest.py: Additional ccache removal 2017-10-02 19:03:18 +02:00
Thomas Woerner
afcc72807c library/ipatest.py: New return value ca_crt_exists
This will provide information if the ca.crt file exists. This will be needed
to be able to decide what needs to be fixed later on.
2017-10-02 19:01:50 +02:00
Thomas Woerner
0611704cb5 library/ipatest.py: Fix krb5_keytab_ok detection to work always 2017-10-02 19:00:25 +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
e797410e62 library/ipaclient.py: Fix mixture of tabs and spaces for Python3 2017-10-02 17:04:23 +02:00
Thomas Woerner
354039321e Fix raise call for Python3 support 2017-10-02 17:03:44 +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
95811b0287 library/ipajoin.py: Drop unused subject base gathering from certificate
ipajoin is not called always and therefore we can no depend on the subject
base gathered from the certificate output of the join call.
2017-09-25 15:57:59 +02:00
Thomas Woerner
7ee3cead85 library/ipadiscovery.py: Drop subject base guessing
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 - done in ipaapi as we are authenticaed there already
to use the api.
2017-09-25 15:55:49 +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
860794232e library/ipajoin.py: Fail for already joined hosts if krb5.keytab is missing
It is not possible to restore a missing krb5.keytab using the admin
credential. Therefore the only way is to fail in this case.
2017-09-21 12:16:02 +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
2ca4200141 library/ipanss.py: mkhomedir is a bool, added missing type 2017-09-19 15:30:43 +02:00
Thomas Woerner
0303a148fe README.md: Fixed typo, minimal ipa version 2017-09-19 15:16:56 +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