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
This commit is contained in:
parent
b21cd3cebc
commit
386cdbc5b4
@ -3,13 +3,6 @@
|
|||||||
# Browbeat Results handlers
|
# Browbeat Results handlers
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: start httpd
|
|
||||||
service:
|
|
||||||
name: httpd
|
|
||||||
state: started
|
|
||||||
enabled: true
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: restart httpd
|
- name: restart httpd
|
||||||
service:
|
service:
|
||||||
name: httpd
|
name: httpd
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
name: httpd
|
name: httpd
|
||||||
state: present
|
state: present
|
||||||
become: true
|
become: true
|
||||||
notify:
|
|
||||||
- start httpd
|
|
||||||
|
|
||||||
- name: Remove welcome.conf if it exists
|
- name: Remove welcome.conf if it exists
|
||||||
file:
|
file:
|
||||||
@ -62,3 +60,10 @@
|
|||||||
shell: "/usr/sbin/semanage port -a -t http_port_t -p tcp {{browbeat_results_port}}"
|
shell: "/usr/sbin/semanage port -a -t http_port_t -p tcp {{browbeat_results_port}}"
|
||||||
become: true
|
become: true
|
||||||
when: "(ansible_selinux['status'] == 'enabled') and (seport_modified.rc != 0)"
|
when: "(ansible_selinux['status'] == 'enabled') and (seport_modified.rc != 0)"
|
||||||
|
|
||||||
|
- name: Start httpd
|
||||||
|
service:
|
||||||
|
name: httpd
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
become: true
|
||||||
|
@ -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))"
|
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
|
- name: Enable Rabbitmq management plugin
|
||||||
command: rabbitmq-plugins enable rabbitmq_management
|
command: /sbin/rabbitmq-plugins enable rabbitmq_management
|
||||||
become: true
|
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))"
|
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
|
# Configure selinux bits
|
||||||
#
|
#
|
||||||
- name: Check for collectd permissive
|
- name: Check for collectd permissive
|
||||||
shell: semodule -l | grep -q permissive_collectd_t
|
shell: /sbin/semodule -l | grep -q permissive_collectd_t
|
||||||
become: true
|
become: true
|
||||||
register: collectd_permissive
|
register: collectd_permissive
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Set permissive for collectd
|
- name: Set permissive for collectd
|
||||||
command: semanage permissive -a collectd_t
|
command: /sbin/semanage permissive -a collectd_t
|
||||||
become: true
|
become: true
|
||||||
when: collectd_permissive.rc != 0
|
when: collectd_permissive.rc != 0
|
||||||
|
|
||||||
@ -264,14 +264,14 @@
|
|||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Check for collectd custom
|
- name: Check for collectd custom
|
||||||
shell: semodule -l | grep -q custom-collectd
|
shell: /sbin/semodule -l | grep -q custom-collectd
|
||||||
become: true
|
become: true
|
||||||
register: collectd_custom
|
register: collectd_custom
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Set custom policy for collectd
|
- name: Set custom policy for collectd
|
||||||
command: semodule -i /root/custom-collectd.pp
|
command: /sbin/semodule -i /root/custom-collectd.pp
|
||||||
become: true
|
become: true
|
||||||
when: collectd_custom.rc != 0
|
when: collectd_custom.rc != 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user