summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc/zabbix_setup
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-08-20 11:44:27 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-08-20 12:18:19 -0400
commit49923edfba6d396140881d6a920e83f9ecf79f77 (patch)
treea11bb5df45b188021b733d6fdab785d9a5604ff5 /playbooks/adhoc/zabbix_setup
parenta473ade355c72b45bff57f01ecd8898725977405 (diff)
downloadopenshift-49923edfba6d396140881d6a920e83f9ecf79f77.tar.gz
openshift-49923edfba6d396140881d6a920e83f9ecf79f77.tar.bz2
openshift-49923edfba6d396140881d6a920e83f9ecf79f77.tar.xz
openshift-49923edfba6d396140881d6a920e83f9ecf79f77.zip
fixed zbx_user. Update password playbook added
Diffstat (limited to 'playbooks/adhoc/zabbix_setup')
-rw-r--r--playbooks/adhoc/zabbix_setup/create_user.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/playbooks/adhoc/zabbix_setup/create_user.yml b/playbooks/adhoc/zabbix_setup/create_user.yml
new file mode 100644
index 000000000..dd74798b7
--- /dev/null
+++ b/playbooks/adhoc/zabbix_setup/create_user.yml
@@ -0,0 +1,31 @@
+---
+# export PYTHONPATH='/usr/lib/python2.7/site-packages/:/home/kwoodson/git/openshift-tools'
+# ansible-playbook -e 'cli_password=zabbix' -e 'cli_new_password=new-zabbix' create_user.yml
+- hosts: localhost
+ gather_facts: no
+ vars_files:
+ - vars/template_heartbeat.yml
+ - vars/template_os_linux.yml
+ vars:
+ g_zserver: http://localhost/zabbix/api_jsonrpc.php
+ g_zuser: admin
+ g_zpassword: "{{ cli_password }}"
+ roles:
+ - ../../../roles/os_zabbix
+ post_tasks:
+ - zbx_user:
+ server: "{{ g_zserver }}"
+ user: "{{ g_zuser }}"
+ password: "{{ g_zpassword }}"
+ state: list
+ register: users
+
+ - debug: var=users
+
+ - name: Update zabbix creds for admin
+ zbx_user:
+ server: "{{ g_zserver }}"
+ user: "{{ g_zuser }}"
+ password: "{{ g_zpassword }}"
+ alias: Admin
+ passwd: "{{ cli_new_password | default(g_zpassword, true) }}"