summaryrefslogtreecommitdiffstats
path: root/roles/nuage_master
diff options
context:
space:
mode:
authorRussell Teague <rteague@redhat.com>2016-11-18 14:26:02 -0500
committerRussell Teague <rteague@redhat.com>2016-11-28 11:11:44 -0500
commitec9c22ca6a376b7d1139a384dcb78f3f5bb5b607 (patch)
treea8c3897b9765b9b6dc02582a851b704be8f0828e /roles/nuage_master
parentb45db4c7e0b278623f7531cee50127aa24686139 (diff)
downloadopenshift-ec9c22ca6a376b7d1139a384dcb78f3f5bb5b607.tar.gz
openshift-ec9c22ca6a376b7d1139a384dcb78f3f5bb5b607.tar.bz2
openshift-ec9c22ca6a376b7d1139a384dcb78f3f5bb5b607.tar.xz
openshift-ec9c22ca6a376b7d1139a384dcb78f3f5bb5b607.zip
Refactored to use Ansible systemd module
* Ansible systemd module used in place of service module * Refactored command tasks which are no longer necessary * Applying rules from openshift-ansible Best Practices Guide
Diffstat (limited to 'roles/nuage_master')
-rw-r--r--roles/nuage_master/README.md4
-rw-r--r--roles/nuage_master/handlers/main.yaml18
-rw-r--r--roles/nuage_master/meta/main.yml6
3 files changed, 18 insertions, 10 deletions
diff --git a/roles/nuage_master/README.md b/roles/nuage_master/README.md
index de101dd19..0f1f6f2b1 100644
--- a/roles/nuage_master/README.md
+++ b/roles/nuage_master/README.md
@@ -5,4 +5,6 @@ Setup Nuage Kubernetes Monitor on the Master node
Requirements
------------
-This role assumes it has been deployed on RHEL/Fedora
+
+* Ansible 2.2
+* This role assumes it has been deployed on RHEL/Fedora
diff --git a/roles/nuage_master/handlers/main.yaml b/roles/nuage_master/handlers/main.yaml
index 56224cf82..162aaae1a 100644
--- a/roles/nuage_master/handlers/main.yaml
+++ b/roles/nuage_master/handlers/main.yaml
@@ -1,18 +1,24 @@
---
- name: restart nuage-openshift-monitor
become: yes
- service: name=nuage-openshift-monitor state=restarted
+ systemd: name=nuage-openshift-monitor state=restarted
- name: restart master
- service: name={{ openshift.common.service_type }}-master state=restarted
+ systemd: name={{ openshift.common.service_type }}-master state=restarted
when: (not openshift_master_ha | bool) and (not master_service_status_changed | default(false))
- name: restart master api
- service: name={{ openshift.common.service_type }}-master-api state=restarted
- when: (openshift_master_ha | bool) and (not master_api_service_status_changed | default(false)) and openshift.master.cluster_method == 'native'
+ systemd: name={{ openshift.common.service_type }}-master-api state=restarted
+ when: >
+ (openshift_master_ha | bool) and
+ (not master_api_service_status_changed | default(false)) and
+ openshift.master.cluster_method == 'native'
# TODO: need to fix up ignore_errors here
- name: restart master controllers
- service: name={{ openshift.common.service_type }}-master-controllers state=restarted
- when: (openshift_master_ha | bool) and (not master_controllers_service_status_changed | default(false)) and openshift.master.cluster_method == 'native'
+ systemd: name={{ openshift.common.service_type }}-master-controllers state=restarted
+ when: >
+ (openshift_master_ha | bool) and
+ (not master_controllers_service_status_changed | default(false)) and
+ openshift.master.cluster_method == 'native'
ignore_errors: yes
diff --git a/roles/nuage_master/meta/main.yml b/roles/nuage_master/meta/main.yml
index 51b89fbf6..b2a47ef71 100644
--- a/roles/nuage_master/meta/main.yml
+++ b/roles/nuage_master/meta/main.yml
@@ -1,10 +1,10 @@
---
galaxy_info:
- author: Vishal Patil
+ author: Vishal Patil
description:
company: Nuage Networks
license: Apache License, Version 2.0
- min_ansible_version: 1.8
+ min_ansible_version: 2.2
platforms:
- name: EL
versions:
@@ -18,5 +18,5 @@ dependencies:
- role: openshift_etcd_client_certificates
- role: os_firewall
os_firewall_allow:
- - service: openshift-monitor
+ - service: openshift-monitor
port: "{{ nuage_mon_rest_server_port }}/tcp"