mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-14 13:32:10 +00:00
Ansible for IPA
This commit is contained in:
12
roles/ipaclient/defaults/main.yml
Normal file
12
roles/ipaclient/defaults/main.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
# defaults file for ipaclient
|
||||
|
||||
ipaclient_domain:
|
||||
ipaclient_realm:
|
||||
ipaclient_server:
|
||||
|
||||
ipaclient_principal:
|
||||
ipaclient_password:
|
||||
ipaclient_keytab:
|
||||
ipaclient_otp:
|
||||
ipaclient_extraargs: []
|
||||
24
roles/ipaclient/meta/main.yml
Normal file
24
roles/ipaclient/meta/main.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
galaxy_info:
|
||||
author: Florence Blanc-Renaud
|
||||
description: A role to join a machine to an IPA domain
|
||||
company: Red Hat, Inc
|
||||
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
|
||||
license: GPLv3
|
||||
|
||||
min_ansible_version: 2.0
|
||||
|
||||
#github_branch:
|
||||
|
||||
platforms:
|
||||
- name: Fedora
|
||||
versions:
|
||||
- 25
|
||||
- name: rhel
|
||||
versions:
|
||||
- 7
|
||||
|
||||
galaxy_tags: [ 'identity', 'ipa']
|
||||
|
||||
dependencies: []
|
||||
19
roles/ipaclient/tasks/install.yml
Normal file
19
roles/ipaclient/tasks/install.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
# tasks file for ipaclient
|
||||
|
||||
- name: Install - Install IPA client package
|
||||
package:
|
||||
name: "{{ ipaclient_package }}"
|
||||
state: present
|
||||
|
||||
- name: Install - Configure IPA client
|
||||
ipaclient:
|
||||
state: present
|
||||
domain: "{{ ipaclient_domain }}"
|
||||
realm: "{{ ipaclient_realm }}"
|
||||
server: "{{ ipaclient_server }}"
|
||||
principal: "{{ ipaclient_principal }}"
|
||||
password: "{{ ipaclient_password }}"
|
||||
keytab: "{{ ipaclient_keytab }}"
|
||||
otp: "{{ ipaclient_otp }}"
|
||||
extra_args: "{{ ipaclient_extraargs }}"
|
||||
16
roles/ipaclient/tasks/main.yml
Normal file
16
roles/ipaclient/tasks/main.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
# tasks file for ipaclient
|
||||
|
||||
- name: Import variables specific to distribution
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- vars/{{ ansible_distribution }}.yml
|
||||
- vars/default.yml
|
||||
|
||||
- name: Install IPA client
|
||||
include: tasks/install.yml
|
||||
when: state|default('present') == 'present'
|
||||
|
||||
- name: Uninstall IPA client
|
||||
include: tasks/uninstall.yml
|
||||
when: state|default('present') == 'absent'
|
||||
11
roles/ipaclient/tasks/uninstall.yml
Normal file
11
roles/ipaclient/tasks/uninstall.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
# tasks to uninstall IPA client
|
||||
|
||||
- name: Uninstall - Uninstall IPA client
|
||||
ipaclient:
|
||||
state: absent
|
||||
|
||||
#- name: Remove IPA client package
|
||||
# package:
|
||||
# name: "{{ ipaclient_package }}"
|
||||
# state: absent
|
||||
3
roles/ipaclient/vars/default.yml
Normal file
3
roles/ipaclient/vars/default.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
# defaults file for ipaclient
|
||||
# defaults/fedora.yml
|
||||
ipaclient_package: freeipa-client
|
||||
4
roles/ipaclient/vars/rhel.yml
Normal file
4
roles/ipaclient/vars/rhel.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
# defaults file for ipaclient
|
||||
# defaults/rhel.yml
|
||||
ipaclient_package: ipa-client
|
||||
|
||||
Reference in New Issue
Block a user