summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/cockpit/defaults/main.yml5
-rw-r--r--roles/cockpit/meta/main.yml15
-rw-r--r--roles/cockpit/tasks/main.yml16
-rw-r--r--roles/lib_zabbix/library/zbx_item.py2
-rw-r--r--roles/lib_zabbix/tasks/create_template.yml2
-rw-r--r--roles/openshift_master/tasks/main.yml8
-rw-r--r--roles/openshift_master/templates/master.yaml.v1.j22
-rw-r--r--roles/openshift_node/templates/node.yaml.v1.j24
-rw-r--r--roles/os_zabbix/vars/template_app_zabbix_agent.yml4
-rw-r--r--roles/os_zabbix/vars/template_app_zabbix_server.yml62
10 files changed, 86 insertions, 34 deletions
diff --git a/roles/cockpit/defaults/main.yml b/roles/cockpit/defaults/main.yml
new file mode 100644
index 000000000..ffd55f1dd
--- /dev/null
+++ b/roles/cockpit/defaults/main.yml
@@ -0,0 +1,5 @@
+---
+os_firewall_use_firewalld: false
+os_firewall_allow:
+- service: cockpit-ws
+ port: 9090/tcp
diff --git a/roles/cockpit/meta/main.yml b/roles/cockpit/meta/main.yml
new file mode 100644
index 000000000..1e3948b19
--- /dev/null
+++ b/roles/cockpit/meta/main.yml
@@ -0,0 +1,15 @@
+---
+galaxy_info:
+ author: Scott Dodson
+ description: Deploy and Enable cockpit-ws plus optional plugins
+ company: Red Hat, Inc.
+ license: Apache License, Version 2.0
+ min_ansible_version: 1.7
+ platforms:
+ - name: EL
+ versions:
+ - 7
+ categories:
+ - cloud
+dependencies:
+ - { role: os_firewall }
diff --git a/roles/cockpit/tasks/main.yml b/roles/cockpit/tasks/main.yml
new file mode 100644
index 000000000..875cbad21
--- /dev/null
+++ b/roles/cockpit/tasks/main.yml
@@ -0,0 +1,16 @@
+---
+- name: Install cockpit-ws
+ yum:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - cockpit-ws
+ - cockpit-shell
+ - cockpit-bridge
+ - "{{ cockpit_plugins }}"
+
+- name: Enable cockpit-ws
+ service:
+ name: cockpit.socket
+ enabled: true
+ state: started
diff --git a/roles/lib_zabbix/library/zbx_item.py b/roles/lib_zabbix/library/zbx_item.py
index 6faa82dfc..caca2df52 100644
--- a/roles/lib_zabbix/library/zbx_item.py
+++ b/roles/lib_zabbix/library/zbx_item.py
@@ -125,6 +125,7 @@ def main():
template_name=dict(default=None, type='str'),
zabbix_type=dict(default=2, type='int'),
value_type=dict(default='int', type='str'),
+ interval=dict(default=60, type='int'),
multiplier=dict(default=None, type='str'),
description=dict(default=None, type='str'),
units=dict(default=None, type='str'),
@@ -189,6 +190,7 @@ def main():
'multiplier': use_multiplier,
'description': module.params['description'],
'units': module.params['units'],
+ 'delay': module.params['interval'],
}
# Remove any None valued params
diff --git a/roles/lib_zabbix/tasks/create_template.yml b/roles/lib_zabbix/tasks/create_template.yml
index 41381e76c..df7888a95 100644
--- a/roles/lib_zabbix/tasks/create_template.yml
+++ b/roles/lib_zabbix/tasks/create_template.yml
@@ -38,6 +38,8 @@
units: "{{ item.units | default('', True) }}"
template_name: "{{ template.name }}"
applications: "{{ item.applications }}"
+ zabbix_type: "{{ item.zabbix_type | default(2, True) }}"
+ interval: "{{ item.interval | default(60, True) }}"
with_items: template.zitems
register: created_items
when: template.zitems is defined
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index fa12005ab..73c04cb08 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -169,13 +169,17 @@
shell: echo {{ openshift_master_cluster_password | quote }} | passwd --stdin hacluster
when: install_result | changed
+- name: Lookup default group for ansible_ssh_user
+ command: "/usr/bin/id -g {{ ansible_ssh_user }}"
+ register: _ansible_ssh_user_gid
+
- name: Create the client config dir(s)
file:
path: "~{{ item }}/.kube"
state: directory
mode: 0700
owner: "{{ item }}"
- group: "{{ item }}"
+ group: "{{ 'root' if item == 'root' else _ansible_ssh_user_gid.stdout }}"
with_items:
- root
- "{{ ansible_ssh_user }}"
@@ -196,7 +200,7 @@
state: file
mode: 0700
owner: "{{ item }}"
- group: "{{ item }}"
+ group: "{{ 'root' if item == 'root' else _ansible_ssh_user_gid.stdout }}"
with_items:
- root
- "{{ ansible_ssh_user }}"
diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2
index 500690523..6e45eaad7 100644
--- a/roles/openshift_master/templates/master.yaml.v1.j2
+++ b/roles/openshift_master/templates/master.yaml.v1.j2
@@ -87,7 +87,9 @@ masterPublicURL: {{ openshift.master.public_api_url }}
networkConfig:
clusterNetworkCIDR: {{ openshift.master.sdn_cluster_network_cidr }}
hostSubnetLength: {{ openshift.master.sdn_host_subnet_length }}
+{% if openshift.common.use_openshift_sdn %}
networkPluginName: {{ openshift.common.sdn_network_plugin_name }}
+{% endif %}
# serviceNetworkCIDR must match kubernetesMasterConfig.servicesSubnet
serviceNetworkCIDR: {{ openshift.master.portal_net }}
{% include 'v1_partials/oauthConfig.j2' %}
diff --git a/roles/openshift_node/templates/node.yaml.v1.j2 b/roles/openshift_node/templates/node.yaml.v1.j2
index 946c0b655..4931d127e 100644
--- a/roles/openshift_node/templates/node.yaml.v1.j2
+++ b/roles/openshift_node/templates/node.yaml.v1.j2
@@ -12,12 +12,16 @@ kind: NodeConfig
kubeletArguments: {{ openshift.node.kubelet_args | to_json }}
{% endif %}
masterKubeConfig: system:node:{{ openshift.common.hostname }}.kubeconfig
+{% if openshift.common.use_openshift_sdn %}
networkPluginName: {{ openshift.common.sdn_network_plugin_name }}
+{% endif %}
# networkConfig struct introduced in origin 1.0.6 and OSE 3.0.2 which
# deprecates networkPluginName above. The two should match.
networkConfig:
mtu: {{ openshift.node.sdn_mtu }}
+{% if openshift.common.use_openshift_sdn %}
networkPluginName: {{ openshift.common.sdn_network_plugin_name }}
+{% endif %}
nodeName: {{ openshift.common.hostname | lower }}
podManifestConfig:
servingInfo:
diff --git a/roles/os_zabbix/vars/template_app_zabbix_agent.yml b/roles/os_zabbix/vars/template_app_zabbix_agent.yml
index 06c4eda8b..6349b6384 100644
--- a/roles/os_zabbix/vars/template_app_zabbix_agent.yml
+++ b/roles/os_zabbix/vars/template_app_zabbix_agent.yml
@@ -6,14 +6,14 @@ g_template_app_zabbix_agent:
applications:
- Zabbix agent
value_type: character
- zabbix_type: '0'
+ zabbix_type: 0
- key: agent.ping
applications:
- Zabbix agent
description: The agent always returns 1 for this item. It could be used in combination with nodata() for availability check.
value_type: int
- zabbix_type: '0'
+ zabbix_type: 0
ztriggers:
- name: '[Reboot] Zabbix agent on {HOST.NAME} is unreachable for 15 minutes'
diff --git a/roles/os_zabbix/vars/template_app_zabbix_server.yml b/roles/os_zabbix/vars/template_app_zabbix_server.yml
index dace2aa29..185ed7ecd 100644
--- a/roles/os_zabbix/vars/template_app_zabbix_server.yml
+++ b/roles/os_zabbix/vars/template_app_zabbix_server.yml
@@ -8,7 +8,7 @@ g_template_app_zabbix_server:
description: A simple count of the number of partition creates output by the housekeeper script.
units: ''
value_type: int
- zabbix_type: '2'
+ zabbix_type: 5
- key: housekeeper_drops
applications:
@@ -16,7 +16,7 @@ g_template_app_zabbix_server:
description: A simple count of the number of partition drops output by the housekeeper script.
units: ''
value_type: int
- zabbix_type: '2'
+ zabbix_type: 5
- key: housekeeper_errors
applications:
@@ -24,7 +24,7 @@ g_template_app_zabbix_server:
description: A simple count of the number of errors output by the housekeeper script.
units: ''
value_type: int
- zabbix_type: '2'
+ zabbix_type: 5
- key: housekeeper_total
applications:
@@ -33,7 +33,7 @@ g_template_app_zabbix_server:
script.
units: ''
value_type: int
- zabbix_type: '2'
+ zabbix_type: 5
- key: zabbix[process,alerter,avg,busy]
applications:
@@ -41,7 +41,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,configuration syncer,avg,busy]
applications:
@@ -49,7 +49,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,db watchdog,avg,busy]
applications:
@@ -57,7 +57,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,discoverer,avg,busy]
applications:
@@ -65,7 +65,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,escalator,avg,busy]
applications:
@@ -73,7 +73,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,history syncer,avg,busy]
applications:
@@ -81,7 +81,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,housekeeper,avg,busy]
applications:
@@ -89,7 +89,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,http poller,avg,busy]
applications:
@@ -97,7 +97,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,icmp pinger,avg,busy]
applications:
@@ -105,7 +105,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,ipmi poller,avg,busy]
applications:
@@ -113,7 +113,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,java poller,avg,busy]
applications:
@@ -121,7 +121,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,node watcher,avg,busy]
applications:
@@ -129,7 +129,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,poller,avg,busy]
applications:
@@ -137,7 +137,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,proxy poller,avg,busy]
applications:
@@ -145,7 +145,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,self-monitoring,avg,busy]
applications:
@@ -153,7 +153,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,snmp trapper,avg,busy]
applications:
@@ -161,7 +161,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,timer,avg,busy]
applications:
@@ -169,7 +169,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,trapper,avg,busy]
applications:
@@ -177,7 +177,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[process,unreachable poller,avg,busy]
applications:
@@ -185,7 +185,7 @@ g_template_app_zabbix_server:
description: ''
units: '%'
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[queue,10m]
applications:
@@ -193,7 +193,8 @@ g_template_app_zabbix_server:
description: ''
units: ''
value_type: int
- zabbix_type: '5'
+ zabbix_type: 5
+ interval: 600
- key: zabbix[queue]
applications:
@@ -201,7 +202,8 @@ g_template_app_zabbix_server:
description: ''
units: ''
value_type: int
- zabbix_type: '5'
+ zabbix_type: 5
+ interval: 600
- key: zabbix[rcache,buffer,pfree]
applications:
@@ -209,7 +211,7 @@ g_template_app_zabbix_server:
description: ''
units: ''
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[wcache,history,pfree]
applications:
@@ -217,7 +219,7 @@ g_template_app_zabbix_server:
description: ''
units: ''
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[wcache,text,pfree]
applications:
@@ -225,7 +227,7 @@ g_template_app_zabbix_server:
description: ''
units: ''
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[wcache,trend,pfree]
applications:
@@ -233,7 +235,7 @@ g_template_app_zabbix_server:
description: ''
units: ''
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
- key: zabbix[wcache,values]
applications:
@@ -241,7 +243,7 @@ g_template_app_zabbix_server:
description: ''
units: ''
value_type: float
- zabbix_type: '5'
+ zabbix_type: 5
ztriggers:
- description: "There has been unexpected output while running the housekeeping script\
\ on the Zabbix. There are only three kinds of lines we expect to see in the output,\