[icinga-checkins] icinga.org: icinga2-ansible/master: Added tasks for installation on OpenSUSE 13.1 while issue #6446 need a fix

git at icinga.org git at icinga.org
Mon Jun 9 16:38:47 CEST 2014


Module: icinga2-ansible
Branch: master
Commit: d6a3d7cd67537a55b3076b89304d1fd7736d894a
URL:    https://git.icinga.org/?p=icinga2-ansible.git;a=commit;h=d6a3d7cd67537a55b3076b89304d1fd7736d894a

Author: Valentino Gagliardi <valentino.g at servermanaged.it>
Date:   Mon Jun  9 13:31:40 2014 +0200

Added tasks for installation on OpenSUSE 13.1 while issue #6446 need a fix

---

 meta/main.yml                            |    6 +++---
 tasks/icinga2_classicui_install_Suse.yml |   11 +++++++++++
 tasks/icinga2_install_Suse.yml           |   18 ++++++++++++++++++
 tasks/main.yml                           |    7 +++++++
 vars/Suse_Bottle.yml                     |   21 +++++++++++++++++++++
 5 files changed, 60 insertions(+), 3 deletions(-)

diff --git a/meta/main.yml b/meta/main.yml
index 0dd81da..9077793 100644
--- a/meta/main.yml
+++ b/meta/main.yml
@@ -36,13 +36,13 @@ galaxy_info:
   #  - 18
   #  - 19
     - 20
-  #- name: opensuse
-  #  versions:
+  - name: opensuse
+    versions:
   #  - all
   #  - 12.1
   #  - 12.2
   #  - 12.3
-  #  - 13.1
+    - 13.1
   #  - 13.2
   #- name: Amazon
   #  versions:
diff --git a/tasks/icinga2_classicui_install_Suse.yml b/tasks/icinga2_classicui_install_Suse.yml
new file mode 100644
index 0000000..5f3cd6c
--- /dev/null
+++ b/tasks/icinga2_classicui_install_Suse.yml
@@ -0,0 +1,11 @@
+- name: Install Icinga classicgui on Suse OS family
+  zypper: name={{ item.package }} 
+          state=latest
+          disable_gpg_check=yes
+  with_items: icinga2_web_pkg
+  notify:
+   - restart icinga2
+   - restart apache
+
+- name: Icinga Classic Gui Installation finished (Suse)
+  debug: msg="Now you can login at http://{{ ansible_eth0.ipv4.address }}/icinga with username icingaadmin and password icingaadmin"
diff --git a/tasks/icinga2_install_Suse.yml b/tasks/icinga2_install_Suse.yml
new file mode 100644
index 0000000..6eead52
--- /dev/null
+++ b/tasks/icinga2_install_Suse.yml
@@ -0,0 +1,18 @@
+---
+- name: Get Icinga2 RPM Key on Suse OS family
+  rpm_key: key={{ icinga2_key }} state=present
+
+- name: Get Icinga2 Repo on Suse OS family
+  zypper_repository: name=icinga2
+                     repo='{{ icinga2_url_zypper }}' 
+                     state=present
+                     disable_gpg_check=yes
+  ignore_errors: yes
+ 
+- name: Install Icinga2 on Suse OS family
+  zypper: name={{ item.package }} 
+          state=present
+          disable_gpg_check=yes
+  with_items: icinga2_pkg
+  notify:
+   - restart icinga2
diff --git a/tasks/main.yml b/tasks/main.yml
index 9316fda..b2c386d 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -16,6 +16,9 @@
 - include: icinga2_install_Fedora.yml
   when: ansible_os_family == 'RedHat' and ansible_distribution == 'Fedora'
 
+- include: icinga2_install_Suse.yml
+  when: ansible_os_family == 'Suse'
+
 - include: icinga2_classicui_install_Debian.yml
   when: ansible_os_family == 'Debian' and ansible_distribution == 'Debian' and ansible_distribution_release == 'wheezy'
         and icinga2_classicui == 'yes'
@@ -31,3 +34,7 @@
 - include: icinga2_classicui_install_Fedora.yml
   when: ansible_os_family == 'RedHat' and ansible_distribution == 'Fedora'
         and icinga2_classicui == 'yes'
+
+- include: icinga2_classicui_install_Suse.yml
+  when: ansible_os_family == 'Suse' 
+        and icinga2_classicui == 'yes'
diff --git a/vars/Suse_Bottle.yml b/vars/Suse_Bottle.yml
new file mode 100644
index 0000000..52066e8
--- /dev/null
+++ b/vars/Suse_Bottle.yml
@@ -0,0 +1,21 @@
+icinga2_key: "http://packages.icinga.org/icinga.key"
+
+icinga2_url_zypper: "http://packages.icinga.org/openSUSE/ICINGA-release.repo"
+
+# Handlers variables
+
+apache: "apache2"
+
+#
+
+icinga2_pkg:
+ - { package: "icinga2" }
+ - { package: "nagios-plugins-all" }
+ - { package: "nagios-nrpe" }
+ - { package: "nagios-plugins-nrpe" }
+
+icinga2_web_pkg:
+ - { package: "icinga2-classicui-config" }
+ - { package: "icinga-gui" }
+
+icinga2_hosts_dir: "/etc/icinga2/conf.d/hosts/"



More information about the icinga-checkins mailing list