summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-08-27 17:02:34 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-08-27 17:02:34 -0400
commite8d71b6ed7421644a765564c85ca3ee32182fed2 (patch)
treeaf8e382f30d875db0655a4d6e705474bb9a92ad0
parent2483b7767d4e56e41e9890adfffe4bdc1480a11b (diff)
downloadopenshift-e8d71b6ed7421644a765564c85ca3ee32182fed2.tar.gz
openshift-e8d71b6ed7421644a765564c85ca3ee32182fed2.tar.bz2
openshift-e8d71b6ed7421644a765564c85ca3ee32182fed2.tar.xz
openshift-e8d71b6ed7421644a765564c85ca3ee32182fed2.zip
Fixed env var defaults.
-rw-r--r--roles/lib_zabbix/library/zbx_application.py4
-rw-r--r--roles/lib_zabbix/library/zbx_discoveryrule.py4
-rw-r--r--roles/lib_zabbix/library/zbx_host.py4
-rw-r--r--roles/lib_zabbix/library/zbx_hostgroup.py4
-rw-r--r--roles/lib_zabbix/library/zbx_item.py4
-rw-r--r--roles/lib_zabbix/library/zbx_itemprototype.py4
-rw-r--r--roles/lib_zabbix/library/zbx_mediatype.py4
-rw-r--r--roles/lib_zabbix/library/zbx_template.py4
-rw-r--r--roles/lib_zabbix/library/zbx_trigger.py4
-rw-r--r--roles/lib_zabbix/library/zbx_user.py4
-rw-r--r--roles/lib_zabbix/library/zbx_user_media.py4
11 files changed, 22 insertions, 22 deletions
diff --git a/roles/lib_zabbix/library/zbx_application.py b/roles/lib_zabbix/library/zbx_application.py
index ffa00e052..d3d08c9dd 100644
--- a/roles/lib_zabbix/library/zbx_application.py
+++ b/roles/lib_zabbix/library/zbx_application.py
@@ -60,8 +60,8 @@ def main():
module = AnsibleModule(
argument_spec=dict(
zbx_server=dict(default='https://localhost/zabbix/api_jsonrpc.php', type='str'),
- zbx_user=dict(default=os.environ['ZABBIX_USER'], type='str'),
- zbx_password=dict(default=os.environ['ZABBIX_PASSWORD'], type='str'),
+ zbx_user=dict(default=os.environ.get('ZABBIX_USER', None), type='str'),
+ zbx_password=dict(default=os.environ.get('ZABBIX_PASSWORD', None), type='str'),
zbx_debug=dict(default=False, type='bool'),
name=dict(default=None, type='str'),
template_name=dict(default=None, type='list'),
diff --git a/roles/lib_zabbix/library/zbx_discoveryrule.py b/roles/lib_zabbix/library/zbx_discoveryrule.py
index 79ee91180..71a0580c2 100644
--- a/roles/lib_zabbix/library/zbx_discoveryrule.py
+++ b/roles/lib_zabbix/library/zbx_discoveryrule.py
@@ -88,8 +88,8 @@ def main():
module = AnsibleModule(
argument_spec=dict(
zbx_server=dict(default='https://localhost/zabbix/api_jsonrpc.php', type='str'),
- zbx_user=dict(default=os.environ['ZABBIX_USER'], type='str'),
- zbx_password=dict(default=os.environ['ZABBIX_PASSWORD'], type='str'),
+ zbx_user=dict(default=os.environ.get('ZABBIX_USER', None), type='str'),
+ zbx_password=dict(default=os.environ.get('ZABBIX_PASSWORD', None), type='str'),
zbx_debug=dict(default=False, type='bool'),
name=dict(default=None, type='str'),
key=dict(default=None, type='str'),
diff --git a/roles/lib_zabbix/library/zbx_host.py b/roles/lib_zabbix/library/zbx_host.py
index 7be03653e..e26c9caf3 100644
--- a/roles/lib_zabbix/library/zbx_host.py
+++ b/roles/lib_zabbix/library/zbx_host.py
@@ -71,8 +71,8 @@ def main():
module = AnsibleModule(
argument_spec=dict(
zbx_server=dict(default='https://localhost/zabbix/api_jsonrpc.php', type='str'),
- zbx_user=dict(default=os.environ['ZABBIX_USER'], type='str'),
- zbx_password=dict(default=os.environ['ZABBIX_PASSWORD'], type='str'),
+ zbx_user=dict(default=os.environ.get('ZABBIX_USER', None), type='str'),
+ zbx_password=dict(default=os.environ.get('ZABBIX_PASSWORD', None), type='str'),
zbx_debug=dict(default=False, type='bool'),
name=dict(default=None, type='str'),
hostgroup_names=dict(default=[], type='list'),
diff --git a/roles/lib_zabbix/library/zbx_hostgroup.py b/roles/lib_zabbix/library/zbx_hostgroup.py
index f161d3d9f..7f080af24 100644
--- a/roles/lib_zabbix/library/zbx_hostgroup.py
+++ b/roles/lib_zabbix/library/zbx_hostgroup.py
@@ -47,8 +47,8 @@ def main():
module = AnsibleModule(
argument_spec=dict(
zbx_server=dict(default='https://localhost/zabbix/api_jsonrpc.php', type='str'),
- zbx_user=dict(default=os.environ['ZABBIX_USER'], type='str'),
- zbx_password=dict(default=os.environ['ZABBIX_PASSWORD'], type='str'),
+ zbx_user=dict(default=os.environ.get('ZABBIX_USER', None), type='str'),
+ zbx_password=dict(default=os.environ.get('ZABBIX_PASSWORD', None), type='str'),
zbx_debug=dict(default=False, type='bool'),
name=dict(default=None, type='str'),
state=dict(default='present', type='str'),
diff --git a/roles/lib_zabbix/library/zbx_item.py b/roles/lib_zabbix/library/zbx_item.py
index 60da243fe..bcd389e47 100644
--- a/roles/lib_zabbix/library/zbx_item.py
+++ b/roles/lib_zabbix/library/zbx_item.py
@@ -80,8 +80,8 @@ def main():
module = AnsibleModule(
argument_spec=dict(
zbx_server=dict(default='https://localhost/zabbix/api_jsonrpc.php', type='str'),
- zbx_user=dict(default=os.environ['ZABBIX_USER'], type='str'),
- zbx_password=dict(default=os.environ['ZABBIX_PASSWORD'], type='str'),
+ zbx_user=dict(default=os.environ.get('ZABBIX_USER', None), type='str'),
+ zbx_password=dict(default=os.environ.get('ZABBIX_PASSWORD', None), type='str'),
zbx_debug=dict(default=False, type='bool'),
name=dict(default=None, type='str'),
key=dict(default=None, type='str'),
diff --git a/roles/lib_zabbix/library/zbx_itemprototype.py b/roles/lib_zabbix/library/zbx_itemprototype.py
index 47100f613..24f85710d 100644
--- a/roles/lib_zabbix/library/zbx_itemprototype.py
+++ b/roles/lib_zabbix/library/zbx_itemprototype.py
@@ -142,8 +142,8 @@ def main():
module = AnsibleModule(
argument_spec=dict(
zbx_server=dict(default='https://localhost/zabbix/api_jsonrpc.php', type='str'),
- zbx_user=dict(default=os.environ['ZABBIX_USER'], type='str'),
- zbx_password=dict(default=os.environ['ZABBIX_PASSWORD'], type='str'),
+ zbx_user=dict(default=os.environ.get('ZABBIX_USER', None), type='str'),
+ zbx_password=dict(default=os.environ.get('ZABBIX_PASSWORD', None), type='str'),
zbx_debug=dict(default=False, type='bool'),
name=dict(default=None, type='str'),
key=dict(default=None, type='str'),
diff --git a/roles/lib_zabbix/library/zbx_mediatype.py b/roles/lib_zabbix/library/zbx_mediatype.py
index cc72cc9a8..3be232ecf 100644
--- a/roles/lib_zabbix/library/zbx_mediatype.py
+++ b/roles/lib_zabbix/library/zbx_mediatype.py
@@ -74,8 +74,8 @@ def main():
module = AnsibleModule(
argument_spec=dict(
zbx_server=dict(default='https://localhost/zabbix/api_jsonrpc.php', type='str'),
- zbx_user=dict(default=os.environ['ZABBIX_USER'], type='str'),
- zbx_password=dict(default=os.environ['ZABBIX_PASSWORD'], type='str'),
+ zbx_user=dict(default=os.environ.get('ZABBIX_USER', None), type='str'),
+ zbx_password=dict(default=os.environ.get('ZABBIX_PASSWORD', None), type='str'),
zbx_debug=dict(default=False, type='bool'),
description=dict(default=None, type='str'),
mtype=dict(default=None, type='str'),
diff --git a/roles/lib_zabbix/library/zbx_template.py b/roles/lib_zabbix/library/zbx_template.py
index 1592fa268..ff5714bdc 100644
--- a/roles/lib_zabbix/library/zbx_template.py
+++ b/roles/lib_zabbix/library/zbx_template.py
@@ -48,8 +48,8 @@ def main():
module = AnsibleModule(
argument_spec=dict(
zbx_server=dict(default='https://localhost/zabbix/api_jsonrpc.php', type='str'),
- zbx_user=dict(default=os.environ['ZABBIX_USER'], type='str'),
- zbx_password=dict(default=os.environ['ZABBIX_PASSWORD'], type='str'),
+ zbx_user=dict(default=os.environ.get('ZABBIX_USER', None), type='str'),
+ zbx_password=dict(default=os.environ.get('ZABBIX_PASSWORD', None), type='str'),
zbx_debug=dict(default=False, type='bool'),
name=dict(default=None, type='str'),
state=dict(default='present', type='str'),
diff --git a/roles/lib_zabbix/library/zbx_trigger.py b/roles/lib_zabbix/library/zbx_trigger.py
index ffad5b40a..43f3d2677 100644
--- a/roles/lib_zabbix/library/zbx_trigger.py
+++ b/roles/lib_zabbix/library/zbx_trigger.py
@@ -94,8 +94,8 @@ def main():
module = AnsibleModule(
argument_spec=dict(
zbx_server=dict(default='https://localhost/zabbix/api_jsonrpc.php', type='str'),
- zbx_user=dict(default=os.environ['ZABBIX_USER'], type='str'),
- zbx_password=dict(default=os.environ['ZABBIX_PASSWORD'], type='str'),
+ zbx_user=dict(default=os.environ.get('ZABBIX_USER', None), type='str'),
+ zbx_password=dict(default=os.environ.get('ZABBIX_PASSWORD', None), type='str'),
zbx_debug=dict(default=False, type='bool'),
expression=dict(default=None, type='str'),
description=dict(default=None, type='str'),
diff --git a/roles/lib_zabbix/library/zbx_user.py b/roles/lib_zabbix/library/zbx_user.py
index a9906d773..c916fa96a 100644
--- a/roles/lib_zabbix/library/zbx_user.py
+++ b/roles/lib_zabbix/library/zbx_user.py
@@ -89,8 +89,8 @@ def main():
module = AnsibleModule(
argument_spec=dict(
zbx_server=dict(default='https://localhost/zabbix/api_jsonrpc.php', type='str'),
- zbx_user=dict(default=os.environ['ZABBIX_USER'], type='str'),
- zbx_password=dict(default=os.environ['ZABBIX_PASSWORD'], type='str'),
+ zbx_user=dict(default=os.environ.get('ZABBIX_USER', None), type='str'),
+ zbx_password=dict(default=os.environ.get('ZABBIX_PASSWORD', None), type='str'),
zbx_debug=dict(default=False, type='bool'),
login=dict(default=None, type='str'),
first_name=dict(default=None, type='str'),
diff --git a/roles/lib_zabbix/library/zbx_user_media.py b/roles/lib_zabbix/library/zbx_user_media.py
index aad3554dd..3f7760475 100644
--- a/roles/lib_zabbix/library/zbx_user_media.py
+++ b/roles/lib_zabbix/library/zbx_user_media.py
@@ -136,8 +136,8 @@ def main():
module = AnsibleModule(
argument_spec=dict(
zbx_server=dict(default='https://localhost/zabbix/api_jsonrpc.php', type='str'),
- zbx_user=dict(default=os.environ['ZABBIX_USER'], type='str'),
- zbx_password=dict(default=os.environ['ZABBIX_PASSWORD'], type='str'),
+ zbx_user=dict(default=os.environ.get('ZABBIX_USER', None), type='str'),
+ zbx_password=dict(default=os.environ.get('ZABBIX_PASSWORD', None), type='str'),
zbx_debug=dict(default=False, type='bool'),
login=dict(default=None, type='str'),
active=dict(default=False, type='bool'),