IPA server role and playbook
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
a02b0b00d9
commit
2d55a8bb7d
2 changed files with 64 additions and 0 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue