mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-03 11:40:22 +08:00
IPA server role and playbook
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
48
playbooks/groups/ipa.yml
Normal file
48
playbooks/groups/ipa.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=ipsilon:ipsilon-stg"
|
||||
|
||||
- name: make the box be real
|
||||
hosts: ipa:ipa-stg
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- nagios/client
|
||||
- hosts
|
||||
- fas_client
|
||||
- rsyncd
|
||||
- sudo
|
||||
- { role: openvpn/client,
|
||||
when: env != "staging" }
|
||||
- apache
|
||||
|
||||
tasks:
|
||||
- include: "{{ tasks }}/yumrepos.yml"
|
||||
- include: "{{ tasks }}/2fa_client.yml"
|
||||
- include: "{{ tasks }}/motd.yml"
|
||||
- include: "{{ tasks }}/mod_wsgi.yml"
|
||||
|
||||
handlers:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
||||
|
||||
- name: deploy ipa itself
|
||||
hosts: ipa:ipa-stg
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- "{{ vars_path }}/{{ ansible_distribution }}.yml"
|
||||
|
||||
roles:
|
||||
- ipa
|
||||
|
||||
handlers:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
||||
16
roles/ipa/tasks/main.yml
Normal file
16
roles/ipa/tasks/main.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
# Configuration for IPA
|
||||
|
||||
- name: install needed packages
|
||||
yum: pkg={{ item }} state=present update_cache=yes
|
||||
with_items:
|
||||
- ipa-server
|
||||
- ipa-server-dns
|
||||
tags:
|
||||
- packages
|
||||
|
||||
- name: install IPA
|
||||
shell: ipa-server-install --realm={{ipa_realm}} --domain={{ipa_realm}} --ds-password{{ipa_dm_password}} --admin-password={{ipa_admin_password}} --mkhomedir --no-ntp --unattended --no-ssh --no-sshd --setup-dns --log-file=/var/log/ipainstall.log
|
||||
creates: /etc/ipa/default.conf
|
||||
tags:
|
||||
- config
|
||||
Reference in New Issue
Block a user