|
Packit Service |
0a38ef |
FreeIPA Ansible collection
|
|
Packit Service |
0a38ef |
==========================
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
This repository contains [Ansible](https://www.ansible.com/) roles and playbooks to install and uninstall [FreeIPA](https://www.freeipa.org/) `servers`, `replicas` and `clients`. Also modules for group, host, topology and user management.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
**Note**: The ansible playbooks and roles require a configured ansible environment where the ansible nodes are reachable and are properly set up to have an IP address and a working package manager.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Features
|
|
Packit Service |
0a38ef |
--------
|
|
Packit Service |
0a38ef |
* Server, replica and client deployment
|
|
Packit Service |
0a38ef |
* Cluster deployments: Server, replicas and clients in one playbook
|
|
Packit Service |
0a38ef |
* One-time-password (OTP) support for client installation
|
|
Packit Service |
0a38ef |
* Repair mode for clients
|
|
Packit Service |
0a38ef |
* Modules for dns forwarder management
|
|
Packit Service |
0a38ef |
* Modules for dns record management
|
|
Packit Service |
0a38ef |
* Modules for dns zone management
|
|
Packit Service |
0a38ef |
* Modules for group management
|
|
Packit Service |
0a38ef |
* Modules for hbacrule management
|
|
Packit Service |
0a38ef |
* Modules for hbacsvc management
|
|
Packit Service |
0a38ef |
* Modules for hbacsvcgroup management
|
|
Packit Service |
0a38ef |
* Modules for host management
|
|
Packit Service |
0a38ef |
* Modules for hostgroup management
|
|
Packit Service |
0a38ef |
* Modules for pwpolicy management
|
|
Packit Service |
0a38ef |
* Modules for service management
|
|
Packit Service |
0a38ef |
* Modules for sudocmd management
|
|
Packit Service |
0a38ef |
* Modules for sudocmdgroup management
|
|
Packit Service |
0a38ef |
* Modules for sudorule management
|
|
Packit Service |
0a38ef |
* Modules for topology management
|
|
Packit Service |
0a38ef |
* Modules for user management
|
|
Packit Service |
0a38ef |
* Modules for vault management
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Supported FreeIPA Versions
|
|
Packit Service |
0a38ef |
--------------------------
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
FreeIPA versions 4.6 and up are supported by all roles.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
The client role supports versions 4.4 and up, the server role is working with versions 4.5 and up, the replica role is currently only working with versions 4.6 and up.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Supported Distributions
|
|
Packit Service |
0a38ef |
-----------------------
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
* RHEL/CentOS 7.4+
|
|
Packit Service |
0a38ef |
* Fedora 26+
|
|
Packit Service |
0a38ef |
* Ubuntu
|
|
Packit Service |
0a38ef |
* Debian 10+ (ipaclient only, no server or replica!)
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Requirements
|
|
Packit Service |
0a38ef |
------------
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
**Controller**
|
|
Packit Service |
0a38ef |
* Ansible version: 2.8+ (ansible-freeipa is an Ansible Collection)
|
|
Packit Service |
0a38ef |
* /usr/bin/kinit is required on the controller if a one time password (OTP) is used
|
|
Packit Service |
0a38ef |
* python3-gssapi is required on the controller if a one time password (OTP) is used with keytab to install the client.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
**Node**
|
|
Packit Service |
0a38ef |
* Supported FreeIPA version (see above)
|
|
Packit Service |
0a38ef |
* Supported distribution (needed for package installation only, see above)
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Limitations
|
|
Packit Service |
0a38ef |
-----------
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
**External signed CA**
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
External signed CA is now supported. But the currently needed two step process is an issue for the processing in a simple playbook.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Work is planned to have a new method to handle CSR for external signed CAs in a separate step before starting the server installation.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Usage
|
|
Packit Service |
0a38ef |
=====
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
How to use ansible-freeipa
|
|
Packit Service |
0a38ef |
--------------------------
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
**GIT repo**
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
The simplest method for now is to clone this repository on the controller from github directly and to start the deployment from the ansible-freeipa directory:
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
```bash
|
|
Packit Service |
0a38ef |
git clone https://github.com/freeipa/ansible-freeipa.git
|
|
Packit Service |
0a38ef |
cd ansible-freeipa
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
You can use the roles directly within the top directory of the git repo, but to be able to use the management modules in the plugins subdirectory, you have to either adapt `ansible.cfg` or create links for the roles, modules or directories.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
You can either adapt ansible.cfg:
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
roles_path = /my/dir/ansible-freeipa/roles
|
|
Packit Service |
0a38ef |
library = /my/dir/ansible-freeipa/plugins/modules
|
|
Packit Service |
0a38ef |
module_utils = /my/dir/ansible-freeipa/plugins/module_utils
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Or you can link the directories:
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
ansible-freeipa/roles to ~/.ansible/
|
|
Packit Service |
0a38ef |
ansible-freeipa/plugins/modules to ~/.ansible/plugins/
|
|
Packit Service |
0a38ef |
ansible-freeipa/plugins/module_utils to ~/.ansible/plugins/
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
**RPM package**
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
There are RPM packages available for Fedora 29+. These are installing the roles and modules into the global Ansible directories for `roles`, `plugins/modules` and `plugins/module_utils` in the `/usr/share/ansible` directory. Therefore is it possible to use the roles and modules without adapting the names like it is done in the example playbooks.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
**Ansible galaxy**
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
This command will get the whole collection from galaxy:
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
```bash
|
|
Packit Service |
0a38ef |
ansible-galaxy collection install freeipa.ansible_freeipa
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Installing collections using the ansible-galaxy command is only supported with ansible 2.9+.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
The mazer tool can be used for to install the collection for ansible 2.8:
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
```bash
|
|
Packit Service |
0a38ef |
mazer install freeipa.ansible_freeipa
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Ansible galaxy does not support the use of dash ('-') in a name and is automatically replacing this with an underscore ('\_'). Therefore the name is `ansible_freeipa`. The ansible_freeipa collection will be placed in the directory `~/.ansible/collections/ansible_collections/freeipa/ansible_freeipa` where it will be automatically be found for this user.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
The needed adaptions of collection prefixes for `modules` and `module_utils` will be done with ansible-freeipa release `0.1.6` for galaxy.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Ansible inventory file
|
|
Packit Service |
0a38ef |
----------------------
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
The most important parts of the inventory file is the definition of the nodes, settings and the management modules. Please remember to use [Ansible vault](https://docs.ansible.com/ansible/latest/user_guide/vault.html) for passwords. The examples here are not using vault for better readability.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
**Master server**
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
The master server is defined within the ```[ipaserver]``` group:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipaserver]
|
|
Packit Service |
0a38ef |
ipaserver.test.local
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
There are variables that need to be set like ```domain```, ```realm```, ```admin password``` and ```dm password```. These can be set in the ```[ipaserver:vars]``` section:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipaserver:vars]
|
|
Packit Service |
0a38ef |
ipaadmin_password=ADMPassword1
|
|
Packit Service |
0a38ef |
ipadm_password=DMPassword1
|
|
Packit Service |
0a38ef |
ipaserver_domain=test.local
|
|
Packit Service |
0a38ef |
ipaserver_realm=TEST.LOCAL
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
The admin principle is ```admin``` by default. Please set ```ipaadmin_principal``` if you need to change it.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
You can also add more setting here, like for example to enable the DNS server or to set auto-forwarders:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipaserver:vars]
|
|
Packit Service |
0a38ef |
ipaserver_setup_dns=yes
|
|
Packit Service |
0a38ef |
ipaserver_auto_forwarders=yes
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
But also to skip package installation or firewalld configuration:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipaserver:vars]
|
|
Packit Service |
0a38ef |
ipaserver_install_packages=no
|
|
Packit Service |
0a38ef |
ipaserver_setup_firewalld=no
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
The installation of packages and also the configuration of the firewall are by default enabled.
|
|
Packit Service |
0a38ef |
Note that it is not enough to mask systemd firewalld service to skip the firewalld configuration. You need to set the variable to `no`.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
For more server settings, please have a look at the [server role documentation](roles/ipaserver/README.md).
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
**Replica**
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
The replicas are defined within the ```[ipareplicas]``` group:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipareplicas]
|
|
Packit Service |
0a38ef |
ipareplica1.test.local
|
|
Packit Service |
0a38ef |
ipareplica2.test.local
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
If the master server is already deployed and there are DNS txt records to be able to auto-detect the server, then it is not needed to set ```domain``` or ```realm``` for the replica deployment. But it might be needed to set the master server of a replica because of the topology. If this is needed, it can be set either in the ```[ipareplicas:vars]``` section if it will apply to all the replicas in the ```[ipareplicas]``` group or it is possible to set this also per replica in the ```[ipareplicas]``` group:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipareplicas]
|
|
Packit Service |
0a38ef |
ipareplica1.test.local
|
|
Packit Service |
0a38ef |
ipareplica2.test.local ipareplica_servers=ipareplica1.test.local
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
This will create a chain from ```ipaserver.test.local <- ipareplica1.test.local <- ipareplica2.test.local```.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
If you need to set more than one server for a replica (for fallbacks etc.), simply use a comma separated list for ```ipareplica_servers```:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipareplicas_tier1]
|
|
Packit Service |
0a38ef |
ipareplica1.test.local
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
[ipareplicas_tier2]
|
|
Packit Service |
0a38ef |
ipareplica2.test.local ipareplica_servers=ipareplica1.test.local,ipaserver.test.local
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
The first entry in ```ipareplica_servers``` will be used as the master.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
In this case you need to have separate tasks in the playbook to first deploy replicas from tier1 and then replicas from tier2:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
---
|
|
Packit Service |
0a38ef |
- name: Playbook to configure IPA replicas (tier1)
|
|
Packit Service |
0a38ef |
hosts: ipareplicas_tier1
|
|
Packit Service |
0a38ef |
become: true
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
roles:
|
|
Packit Service |
0a38ef |
- role: ipareplica
|
|
Packit Service |
0a38ef |
state: present
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
- name: Playbook to configure IPA replicas (tier2)
|
|
Packit Service |
0a38ef |
hosts: ipareplicas_tier2
|
|
Packit Service |
0a38ef |
become: true
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
roles:
|
|
Packit Service |
0a38ef |
- role: ipareplica
|
|
Packit Service |
0a38ef |
state: present
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
You can add settings for replica deployment:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipareplicas:vars]
|
|
Packit Service |
0a38ef |
ipaadmin_password=ADMPassword1
|
|
Packit Service |
0a38ef |
ipadm_password=DMPassword1
|
|
Packit Service |
0a38ef |
ipaserver_domain=test.local
|
|
Packit Service |
0a38ef |
ipaserver_realm=TEST.LOCAL
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
You can also add more setting here, like for example to setup DNS or to enable auto-forwarders:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipareplica:vars]
|
|
Packit Service |
0a38ef |
ipaserver_setup_dns=yes
|
|
Packit Service |
0a38ef |
ipaserver_auto_forwarders=yes
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
If you need to skip package installation or firewalld configuration:
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipareplicas:vars]
|
|
Packit Service |
0a38ef |
ipareplica_install_packages=no
|
|
Packit Service |
0a38ef |
ipareplica_setup_firewalld=no
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
The installation of packages and also the configuration of the firewall are by default enabled.
|
|
Packit Service |
0a38ef |
Note that it is not enough to mask systemd firewalld service to skip the firewalld configuration. You need to set the variable to `no`.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
For more replica settings, please have a look at the [replica role documentation](roles/ipareplica/README.md).
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
**Client**
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Clients are defined within the [ipaclients] group:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipaclients]
|
|
Packit Service |
0a38ef |
ipaclient1.test.local
|
|
Packit Service |
0a38ef |
ipaclient2.test.local
|
|
Packit Service |
0a38ef |
ipaclient3.test.local
|
|
Packit Service |
0a38ef |
ipaclient4.test.local
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
For simple setups or in defined client environments it might not be needed to set domain or realm for the replica deployment. But it might be needed to set the master server of a client because of the topology. If this is needed, it can be set either in the [ipaclients:vars} section if it will apply to all the clients in the [ipaclients] group or it is possible to set this also per client in the [ipaclients] group:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipaclients]
|
|
Packit Service |
0a38ef |
ipaclient1.test.local ipaclient_servers=ipareplica1.test.local
|
|
Packit Service |
0a38ef |
ipaclient2.test.local ipaclient_servers=ipareplica1.test.local
|
|
Packit Service |
0a38ef |
ipaclient3.test.local ipaclient_servers=ipareplica2.test.local
|
|
Packit Service |
0a38ef |
ipaclient4.test.local ipaclient_servers=ipareplica2.test.local
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
If you need to set more than one server for a client (for fallbacks etc.), simply use a comma separated list for ```ipaclient_servers```.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
You can add settings for client deployment:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipaclients:vars]
|
|
Packit Service |
0a38ef |
ipaadmin_password=ADMPassword1
|
|
Packit Service |
0a38ef |
ipaserver_domain=test.local
|
|
Packit Service |
0a38ef |
ipaserver_realm=TEST.LOCAL
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
For enhanced security it is possible to use a auto-generated one-time-password (OTP). This will be generated on the controller using the (first) server. It is needed to have the Python gssapi bindings installed on the controller for this.
|
|
Packit Service |
0a38ef |
To enable the generation of the one-time-password:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipaclients:vars]
|
|
Packit Service |
0a38ef |
ipaclient_use_otp=yes
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
For more client settings, please have a look at the [client role documentation](roles/ipaclient/README.md).
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
**Cluster**
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
If you want to deploy more than a master server at once, then it will be good to define a new group like ```[ipacluster]``` that contains all the other groups ```[ipaserver]```, ```[ipareplicas]``` and ```[ipaclients]```. This way it is not needed to set ```domain```, ```realm```, ```admin password``` or ```dm password``` for the single groups:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
[ipacluster:children]
|
|
Packit Service |
0a38ef |
ipaserver
|
|
Packit Service |
0a38ef |
ipareplicas
|
|
Packit Service |
0a38ef |
ipaclients
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
[ipacluster:vars]
|
|
Packit Service |
0a38ef |
ipaadmin_password=ADMPassword1
|
|
Packit Service |
0a38ef |
ipadm_password=DMPassword1
|
|
Packit Service |
0a38ef |
ipaserver_domain=test.local
|
|
Packit Service |
0a38ef |
ipaserver_realm=TEST.LOCAL
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
All these settings will be available in the ```[ipaserver]```, ```[ipareplicas]``` and ```[ipaclient]``` groups.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
**Topology**
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
With this playbook it is possible to add a list of topology segments using the `ipatopologysegment` module.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
---
|
|
Packit Service |
0a38ef |
- name: Add topology segments
|
|
Packit Service |
0a38ef |
hosts: ipaserver
|
|
Packit Service |
0a38ef |
become: true
|
|
Packit Service |
0a38ef |
gather_facts: false
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
vars:
|
|
Packit Service |
0a38ef |
ipaadmin_password: password1
|
|
Packit Service |
0a38ef |
ipatopology_segments:
|
|
Packit Service |
0a38ef |
- {suffix: domain, left: replica1.test.local, right: replica2.test.local}
|
|
Packit Service |
0a38ef |
- {suffix: domain, left: replica2.test.local, right: replica3.test.local}
|
|
Packit Service |
0a38ef |
- {suffix: domain, left: replica3.test.local, right: replica4.test.local}
|
|
Packit Service |
0a38ef |
- {suffix: domain+ca, left: replica4.test.local, right: replica1.test.local}
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
tasks:
|
|
Packit Service |
0a38ef |
- name: Add topology segment
|
|
Packit Service |
0a38ef |
ipatopologysegment:
|
|
Packit Service |
0a38ef |
password: "{{ ipaadmin_password }}"
|
|
Packit Service |
0a38ef |
suffix: "{{ item.suffix }}"
|
|
Packit Service |
0a38ef |
name: "{{ item.name | default(omit) }}"
|
|
Packit Service |
0a38ef |
left: "{{ item.left }}"
|
|
Packit Service |
0a38ef |
right: "{{ item.right }}"
|
|
Packit Service |
0a38ef |
#state: present
|
|
Packit Service |
0a38ef |
#state: absent
|
|
Packit Service |
0a38ef |
#state: checked
|
|
Packit Service |
0a38ef |
state: reinitialized
|
|
Packit Service |
0a38ef |
loop: "{{ ipatopology_segments | default([]) }}"
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Playbooks
|
|
Packit Service |
0a38ef |
=========
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
The playbooks needed to deploy or undeploy server, replicas and clients are part of the repository and placed in the playbooks folder. There are also playbooks to deploy and undeploy clusters. With them it is only needed to add an inventory file:
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
playbooks\
|
|
Packit Service |
0a38ef |
install-client.yml
|
|
Packit Service |
0a38ef |
install-cluster.yml
|
|
Packit Service |
0a38ef |
install-replica.yml
|
|
Packit Service |
0a38ef |
install-server.yml
|
|
Packit Service |
0a38ef |
uninstall-client.yml
|
|
Packit Service |
0a38ef |
uninstall-cluster.yml
|
|
Packit Service |
0a38ef |
uninstall-replica.yml
|
|
Packit Service |
0a38ef |
uninstall-server.yml
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
How to deploy a master server
|
|
Packit Service |
0a38ef |
-----------------------------
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
```bash
|
|
Packit Service |
0a38ef |
ansible-playbook -v -i inventory/hosts install-server.yml
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
This will deploy the master server defined in the inventory file.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
If Ansible vault is used for passwords, then it is needed to adapt the playbooks in this way:
|
|
Packit Service |
0a38ef |
```yaml
|
|
Packit Service |
0a38ef |
---
|
|
Packit Service |
0a38ef |
- name: Playbook to configure IPA servers
|
|
Packit Service |
0a38ef |
hosts: ipaserver
|
|
Packit Service |
0a38ef |
become: true
|
|
Packit Service |
0a38ef |
vars_files:
|
|
Packit Service |
0a38ef |
- playbook_sensitive_data.yml
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
roles:
|
|
Packit Service |
0a38ef |
- role: ipaserver
|
|
Packit Service |
0a38ef |
state: present
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
It is also needed to provide the vault password file on the ansible-playbook command line:
|
|
Packit Service |
0a38ef |
```bash
|
|
Packit Service |
0a38ef |
ansible-playbook -v -i inventory/hosts --vault-password-file .vaul_pass.txt install-server.yml
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
How to deploy a replica
|
|
Packit Service |
0a38ef |
-----------------------
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
```bash
|
|
Packit Service |
0a38ef |
ansible-playbook -v -i inventory/hosts install-replica.yml
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
This will deploy the replicas defined in the inventory file.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
How to setup a client
|
|
Packit Service |
0a38ef |
---------------------
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
```bash
|
|
Packit Service |
0a38ef |
ansible-playbook -v -i inventory/hosts install-client.yml
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
This will deploy the clients defined in the inventory file.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
How to deploy a cluster
|
|
Packit Service |
0a38ef |
-----------------------
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
```bash
|
|
Packit Service |
0a38ef |
ansible-playbook -v -i inventory/hosts install-cluster.yml
|
|
Packit Service |
0a38ef |
```
|
|
Packit Service |
0a38ef |
This will deploy the server, replicas and clients defined in the inventory file.
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Roles
|
|
Packit Service |
0a38ef |
=====
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
* [Server](roles/ipaserver/README.md)
|
|
Packit Service |
0a38ef |
* [Replica](roles/ipareplica/README.md)
|
|
Packit Service |
0a38ef |
* [Client](roles/ipaclient/README.md)
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
Modules in plugin/modules
|
|
Packit Service |
0a38ef |
=========================
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
* [ipadnsconfig](README-dnsconfig.md)
|
|
Packit Service |
0a38ef |
* [ipadnsforwardzone](README-dnsforwardzone.md)
|
|
Packit Service |
0a38ef |
* [ipadnsrecord](README-dnsrecord.md)
|
|
Packit Service |
0a38ef |
* [ipadnszone](README-dnszone.md)
|
|
Packit Service |
0a38ef |
* [ipagroup](README-group.md)
|
|
Packit Service |
0a38ef |
* [ipahbacrule](README-hbacrule.md)
|
|
Packit Service |
0a38ef |
* [ipahbacsvc](README-hbacsvc.md)
|
|
Packit Service |
0a38ef |
* [ipahbacsvcgroup](README-hbacsvc.md)
|
|
Packit Service |
0a38ef |
* [ipahost](README-host.md)
|
|
Packit Service |
0a38ef |
* [ipahostgroup](README-hostgroup.md)
|
|
Packit Service |
0a38ef |
* [ipapwpolicy](README-pwpolicy.md)
|
|
Packit Service |
0a38ef |
* [ipaservice](README-service.md)
|
|
Packit Service |
0a38ef |
* [ipasudocmd](README-sudocmd.md)
|
|
Packit Service |
0a38ef |
* [ipasudocmdgroup](README-sudocmdgroup.md)
|
|
Packit Service |
0a38ef |
* [ipasudorule](README-sudorule.md)
|
|
Packit Service |
0a38ef |
* [ipatopologysegment](README-topology.md)
|
|
Packit Service |
0a38ef |
* [ipatopologysuffix](README-topology.md)
|
|
Packit Service |
0a38ef |
* [ipauser](README-user.md)
|
|
Packit Service |
0a38ef |
* [ipavault](README-vault.md)
|
|
Packit Service |
0a38ef |
|
|
Packit Service |
0a38ef |
If you want to write a new module please read [writing a new module](plugins/modules/README.md).
|