forked from ISTI-ansible-roles/ansible-roles
library/roles/fusiondirectory: Install the fusiondirectory packages.
This commit is contained in:
parent
6bb18d2555
commit
5dace451a3
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
fusiondirectory_install: False
|
||||
fusiondirectory_schemas_install: True
|
||||
# We use the debian wheezy repo for Ubuntu precise and Ubuntu trusty
|
||||
fusiond_repo: 'deb http://repos.fusiondirectory.org/debian-wheezy wheezy main'
|
||||
fusiond_extra_repo: 'deb http://repos.fusiondirectory.org/debian-extra wheezy main'
|
||||
fusiond_repo_key: 62B4981F
|
||||
fusiond_gpg_repo: keys.gnupg.net
|
||||
|
||||
fusiondirectory_main_pkgs:
|
||||
- fusiondirectory-archive-keyring
|
||||
- fusiondirectory
|
||||
|
||||
fusiondirectory_main_plugins:
|
||||
- fusiondirectory-plugin-nagios
|
||||
- fusiondirectory-plugin-ldapmanager
|
||||
- fusiondirectory-plugin-ssh
|
||||
|
||||
fusiondirectory_main_schemas:
|
||||
- fusiondirectory-plugin-nagios-schema
|
||||
- fusiondirectory-schema
|
||||
- fusiondirectory-plugin-ssh-schema
|
||||
|
||||
#fusiondirectory_plugins:
|
||||
|
||||
#fusiondirectory_schemas:
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- include: manage-fd-repos.yml
|
||||
- include: manage-fd-packages.yml
|
||||
- include: manage-fd-schemas.yml
|
||||
when: fusiondirectory_schemas_install
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
- block:
|
||||
|
||||
- name: Install the fusiondirectory main packages
|
||||
apt: name={{ item }} state=present update_cache=yes
|
||||
with_items: '{{ fusiondirectory_main_pkgs }}'
|
||||
|
||||
- name: Install the fusiondirectory main plugins
|
||||
apt: name={{ item }} state=present
|
||||
with_items: '{{ fusiondirectory_main_plugins }}'
|
||||
|
||||
- name: Install the fusiondirectory additional plugins
|
||||
apt: name={{ item }} state=present
|
||||
with_items: '{{ fusiondirectory_plugins | default ([]) }}'
|
||||
|
||||
when: fusiondirectory_install
|
||||
tags: fusiondirectory
|
||||
|
||||
- block:
|
||||
|
||||
- name: Remove the fusiondirectory main plugins
|
||||
apt: name={{ item }} state=absent
|
||||
with_items: '{{ fusiondirectory_main_plugins }}'
|
||||
|
||||
- name: Remove the fusiondirectory additional plugins
|
||||
apt: name={{ item }} state=absent
|
||||
with_items: '{{ fusiondirectory_plugins | default ([]) }}'
|
||||
|
||||
- name: Remove the fusiondirectory main packages
|
||||
apt: name={{ item }} state=absent
|
||||
with_items: '{{ fusiondirectory_main_pkgs }}'
|
||||
|
||||
when: not fusiondirectory_install
|
||||
tags: fusiondirectory
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
- block:
|
||||
|
||||
- name: Get the Fusion Directory repo key
|
||||
apt_key: id={{ fusiond_repo_key }} keyserver={{ fusiond_gpg_repo }}
|
||||
|
||||
- name: Install the Fusion Directory repo
|
||||
apt_repository: repo={{ fusiond_repo }}
|
||||
|
||||
- name: Install the Fusion Directory debian extras repo
|
||||
apt_repository: repo={{ fusiond_extra_repo }}
|
||||
|
||||
when: fusiondirectory_install
|
||||
tags: fusiondirectory
|
||||
|
||||
- block:
|
||||
|
||||
- name: Remove the Fusion Directory repo key
|
||||
apt_key: id={{ fusiond_repo_key }} keyserver={{ fusiond_gpg_repo }} state=absent
|
||||
|
||||
- name: Remove the Fusion Directory repo
|
||||
apt_repository: repo={{ fusiond_repo }} state=absent
|
||||
|
||||
- name: Remove the Fusion Directory debian extras repo
|
||||
apt_repository: repo={{ fusiond_extra_repo }} state=absent update_cache=yes
|
||||
|
||||
when: not fusiondirectory_install
|
||||
tags: fusiondirectory
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
- block:
|
||||
|
||||
- name: Install the fusiondirectory main schemas
|
||||
apt: name={{ item }} state=present update_cache=yes
|
||||
with_items: '{{ fusiondirectory_main_schemas }}'
|
||||
|
||||
- name: Install the fusiondirectory additional schemas
|
||||
apt: name={{ item }} state=present
|
||||
with_items: '{{ fusiondirectory_schemas | default ([]) }}'
|
||||
|
||||
when: fusiondirectory_schemas_install
|
||||
tags: [ 'fusiondirectory', 'fd_schemas' ]
|
||||
|
||||
- block:
|
||||
|
||||
- name: Remove the fusiondirectory main schemas
|
||||
apt: name={{ item }} state=absent
|
||||
with_items: '{{ fusiondirectory_main_schemas }}'
|
||||
|
||||
- name: Remove the fusiondirectory additional schemas
|
||||
apt: name={{ item }} state=absent
|
||||
with_items: '{{ fusiondirectory_schemas | default ([]) }}'
|
||||
|
||||
when: not fusiondirectory_schemas_install
|
||||
tags: [ 'fusiondirectory', 'fd_schemas' ]
|
||||
|
Loading…
Reference in New Issue