From 386cdbc5b4f85319789c7755b044b00f576ad0c2 Mon Sep 17 00:00:00 2001 From: akrzos Date: Wed, 14 Jun 2017 11:51:58 -0400 Subject: [PATCH] Improve collectd install and browbeat-results While debugging, typically browbeat install or having incorrect settings in all.yml you won't have httpd running. Rather than notify, lets just try and start the httpd service. Change-Id: I0df4aa573b2189e287869c50313c55a9d8ac6538 --- .../install/roles/browbeat-results/handlers/main.yml | 7 ------- ansible/install/roles/browbeat-results/tasks/main.yml | 9 +++++++-- .../install/roles/collectd-openstack/tasks/main.yml | 10 +++++----- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ansible/install/roles/browbeat-results/handlers/main.yml b/ansible/install/roles/browbeat-results/handlers/main.yml index 5117c4707..48c13e5d3 100644 --- a/ansible/install/roles/browbeat-results/handlers/main.yml +++ b/ansible/install/roles/browbeat-results/handlers/main.yml @@ -3,13 +3,6 @@ # Browbeat Results handlers # -- name: start httpd - service: - name: httpd - state: started - enabled: true - become: true - - name: restart httpd service: name: httpd diff --git a/ansible/install/roles/browbeat-results/tasks/main.yml b/ansible/install/roles/browbeat-results/tasks/main.yml index b681230af..93af66090 100644 --- a/ansible/install/roles/browbeat-results/tasks/main.yml +++ b/ansible/install/roles/browbeat-results/tasks/main.yml @@ -8,8 +8,6 @@ name: httpd state: present become: true - notify: - - start httpd - name: Remove welcome.conf if it exists file: @@ -62,3 +60,10 @@ shell: "/usr/sbin/semanage port -a -t http_port_t -p tcp {{browbeat_results_port}}" become: true when: "(ansible_selinux['status'] == 'enabled') and (seport_modified.rc != 0)" + +- name: Start httpd + service: + name: httpd + state: started + enabled: true + become: true diff --git a/ansible/install/roles/collectd-openstack/tasks/main.yml b/ansible/install/roles/collectd-openstack/tasks/main.yml index 36ecbe348..2c660fb74 100644 --- a/ansible/install/roles/collectd-openstack/tasks/main.yml +++ b/ansible/install/roles/collectd-openstack/tasks/main.yml @@ -183,7 +183,7 @@ when: "(('controller' in group_names and {{rabbitmq_controller_collectd_plugin}} == true and '{{inventory_hostname}}' == groups['controller'][0]) or ('undercloud' in group_names and {{rabbitmq_undercloud_collectd_plugin}} == true))" - name: Enable Rabbitmq management plugin - command: rabbitmq-plugins enable rabbitmq_management + command: /sbin/rabbitmq-plugins enable rabbitmq_management become: true when: "(('controller' in group_names and {{rabbitmq_controller_collectd_plugin}} == true and '{{inventory_hostname}}' == groups['controller'][0]) or ('undercloud' in group_names and {{rabbitmq_undercloud_collectd_plugin}} == true))" @@ -240,14 +240,14 @@ # Configure selinux bits # - name: Check for collectd permissive - shell: semodule -l | grep -q permissive_collectd_t + shell: /sbin/semodule -l | grep -q permissive_collectd_t become: true register: collectd_permissive ignore_errors: true changed_when: false - name: Set permissive for collectd - command: semanage permissive -a collectd_t + command: /sbin/semanage permissive -a collectd_t become: true when: collectd_permissive.rc != 0 @@ -264,14 +264,14 @@ become: true - name: Check for collectd custom - shell: semodule -l | grep -q custom-collectd + shell: /sbin/semodule -l | grep -q custom-collectd become: true register: collectd_custom ignore_errors: true changed_when: false - name: Set custom policy for collectd - command: semodule -i /root/custom-collectd.pp + command: /sbin/semodule -i /root/custom-collectd.pp become: true when: collectd_custom.rc != 0