summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/adhoc')
-rw-r--r--playbooks/adhoc/create_pv/create_pv.yaml20
-rw-r--r--playbooks/adhoc/docker_loopback_to_lvm/docker_loopback_to_direct_lvm.yml2
-rw-r--r--playbooks/adhoc/grow_docker_vg/grow_docker_vg.yml2
-rw-r--r--playbooks/adhoc/noc/create_host.yml4
-rw-r--r--playbooks/adhoc/noc/create_maintenance.yml2
-rw-r--r--playbooks/adhoc/noc/get_zabbix_problems.yml2
-rw-r--r--playbooks/adhoc/s3_registry/s3_registry.yml2
-rw-r--r--playbooks/adhoc/uninstall.yml36
-rw-r--r--playbooks/adhoc/zabbix_setup/clean_zabbix.yml2
-rwxr-xr-xplaybooks/adhoc/zabbix_setup/oo-config-zaio.yml2
10 files changed, 28 insertions, 46 deletions
diff --git a/playbooks/adhoc/create_pv/create_pv.yaml b/playbooks/adhoc/create_pv/create_pv.yaml
index 4f0ef7a75..0ca040ee1 100644
--- a/playbooks/adhoc/create_pv/create_pv.yaml
+++ b/playbooks/adhoc/create_pv/create_pv.yaml
@@ -1,20 +1,22 @@
---
-#example run:
+#example run:
# ansible-playbook -e "cli_volume_size=1" \
# -e "cli_device_name=/dev/xvdf" \
# -e "cli_hosttype=master" \
-# -e "cli_environment=ops" \
+# -e "cli_env=ops" \
# create_pv.yaml
-# FIXME: we need to change "environment" to "clusterid" as that's what it really is now.
+# FIXME: we need to change "env" to "clusterid" as that's what it really is now.
#
- name: Create a volume and attach it to master
hosts: localhost
+ connection: local
+ become: no
gather_facts: no
vars:
cli_volume_type: gp2
cli_volume_iops: ''
oo_name: "{{ groups['tag_host-type_' ~ cli_hosttype] |
- intersect(groups['tag_environment_' ~ cli_environment]) |
+ intersect(groups['tag_env_' ~ cli_env]) |
first }}"
pre_tasks:
- fail:
@@ -24,7 +26,7 @@
- cli_volume_size
- cli_device_name
- cli_hosttype
- - cli_environment
+ - cli_env
- name: set oo_name fact
set_fact:
@@ -55,7 +57,7 @@
args:
tags:
Name: "pv-{{ hostvars[oo_name]['ec2_tag_Name'] }}"
- env: "{{cli_environment}}"
+ env: "{{cli_env}}"
register: voltags
- debug: var=voltags
@@ -103,7 +105,7 @@
filesystem:
dev: "{{ cli_device_name }}"
fstype: ext4
-
+
- name: Mount the dev
mount:
name: "{{ pv_mntdir }}"
@@ -112,7 +114,7 @@
state: mounted
- name: chgrp g+rwXs
- file:
+ file:
path: "{{ pv_mntdir }}"
mode: 'g+rwXs'
recurse: yes
@@ -154,6 +156,6 @@
- debug: var=oc_output
- - fail:
+ - fail:
msg: "Failed to add {{ pv_template }} to master."
when: oc_output.rc != 0
diff --git a/playbooks/adhoc/docker_loopback_to_lvm/docker_loopback_to_direct_lvm.yml b/playbooks/adhoc/docker_loopback_to_lvm/docker_loopback_to_direct_lvm.yml
index b6a2d2f26..89128dd3c 100644
--- a/playbooks/adhoc/docker_loopback_to_lvm/docker_loopback_to_direct_lvm.yml
+++ b/playbooks/adhoc/docker_loopback_to_lvm/docker_loopback_to_direct_lvm.yml
@@ -113,7 +113,7 @@
args:
tags:
Name: "{{ ec2_tag_Name }}"
- env: "{{ ec2_tag_environment }}"
+ env: "{{ ec2_tag_env}}"
register: voltags
- name: Wait for volume to attach
diff --git a/playbooks/adhoc/grow_docker_vg/grow_docker_vg.yml b/playbooks/adhoc/grow_docker_vg/grow_docker_vg.yml
index 63d473146..b4bcb25da 100644
--- a/playbooks/adhoc/grow_docker_vg/grow_docker_vg.yml
+++ b/playbooks/adhoc/grow_docker_vg/grow_docker_vg.yml
@@ -151,7 +151,7 @@
args:
tags:
Name: "{{ ec2_tag_Name }}"
- env: "{{ ec2_tag_environment }}"
+ env: "{{ ec2_tag_env }}"
register: voltags
- name: check for attached drive
diff --git a/playbooks/adhoc/noc/create_host.yml b/playbooks/adhoc/noc/create_host.yml
index d250e6e69..2d2cae2b5 100644
--- a/playbooks/adhoc/noc/create_host.yml
+++ b/playbooks/adhoc/noc/create_host.yml
@@ -1,6 +1,8 @@
---
- name: 'Create a host object in zabbix'
hosts: localhost
+ connection: local
+ become: no
gather_facts: no
roles:
- os_zabbix
@@ -23,6 +25,8 @@
#ansible-playbook -e 'oo_desc=kwoodson test' -e 'oo_name=kwoodson test name' -e 'oo_start=1435715357' -e 'oo_stop=1435718985' -e 'oo_hostids=11549' create_maintenance.yml
- name: 'Create a host object in zabbix'
hosts: localhost
+ connection: local
+ become: no
gather_facts: no
roles:
- os_zabbix
diff --git a/playbooks/adhoc/noc/create_maintenance.yml b/playbooks/adhoc/noc/create_maintenance.yml
index c0ec57ce1..8ad5fa0e2 100644
--- a/playbooks/adhoc/noc/create_maintenance.yml
+++ b/playbooks/adhoc/noc/create_maintenance.yml
@@ -2,6 +2,8 @@
#ansible-playbook -e 'oo_desc=kwoodson test' -e 'oo_name=kwoodson test name' -e 'oo_start=1435715357' -e 'oo_stop=1435718985' -e 'oo_hostids=11549' create_maintenance.yml
- name: 'Create a maintenace object in zabbix'
hosts: localhost
+ connection: local
+ become: no
gather_facts: no
roles:
- os_zabbix
diff --git a/playbooks/adhoc/noc/get_zabbix_problems.yml b/playbooks/adhoc/noc/get_zabbix_problems.yml
index 4b94fa228..79cae24ab 100644
--- a/playbooks/adhoc/noc/get_zabbix_problems.yml
+++ b/playbooks/adhoc/noc/get_zabbix_problems.yml
@@ -1,6 +1,8 @@
---
- name: 'Get current hosts who have triggers that are alerting by trigger description'
hosts: localhost
+ connection: local
+ become: no
gather_facts: no
roles:
- os_zabbix
diff --git a/playbooks/adhoc/s3_registry/s3_registry.yml b/playbooks/adhoc/s3_registry/s3_registry.yml
index 4dcef1a42..071c2cf46 100644
--- a/playbooks/adhoc/s3_registry/s3_registry.yml
+++ b/playbooks/adhoc/s3_registry/s3_registry.yml
@@ -6,7 +6,7 @@
# The AWS access/secret keys should be the keys of a separate user (not your main user), containing only the necessary S3 access role.
# The 'clusterid' is the short name of your cluster.
-- hosts: tag_env-host-type_{{ clusterid }}-openshift-master
+- hosts: tag_env_{{ clusterid }}:&tag_host-type_openshift-master
remote_user: root
gather_facts: False
diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml
index 08a2ea6fb..9161076e5 100644
--- a/playbooks/adhoc/uninstall.yml
+++ b/playbooks/adhoc/uninstall.yml
@@ -47,40 +47,8 @@
- origin-node
- pcsd
- - yum: name={{ item }} state=absent
- when: ansible_pkg_mgr == "yum" and not is_atomic | bool
- with_items:
- - atomic-enterprise
- - atomic-enterprise-master
- - atomic-enterprise-node
- - atomic-enterprise-sdn-ovs
- - atomic-openshift
- - atomic-openshift-clients
- - atomic-openshift-master
- - atomic-openshift-node
- - atomic-openshift-sdn-ovs
- - corosync
- - etcd
- - openshift
- - openshift-master
- - openshift-node
- - openshift-sdn
- - openshift-sdn-ovs
- - openvswitch
- - origin
- - origin-clients
- - origin-master
- - origin-node
- - origin-sdn-ovs
- - pacemaker
- - pcs
- - tuned-profiles-atomic-enterprise-node
- - tuned-profiles-atomic-openshift-node
- - tuned-profiles-openshift-node
- - tuned-profiles-origin-node
-
- - dnf: name={{ item }} state=absent
- when: ansible_pkg_mgr == "dnf" and not is_atomic | bool
+ - action: "{{ ansible_pkg_mgr }} name={{ item }} state=absent"
+ when: not is_atomic | bool
with_items:
- atomic-enterprise
- atomic-enterprise-master
diff --git a/playbooks/adhoc/zabbix_setup/clean_zabbix.yml b/playbooks/adhoc/zabbix_setup/clean_zabbix.yml
index 1e884240a..09f7c76cc 100644
--- a/playbooks/adhoc/zabbix_setup/clean_zabbix.yml
+++ b/playbooks/adhoc/zabbix_setup/clean_zabbix.yml
@@ -1,6 +1,8 @@
---
- hosts: localhost
gather_facts: no
+ connection: local
+ become: no
vars:
g_server: http://localhost:8080/zabbix/api_jsonrpc.php
g_user: ''
diff --git a/playbooks/adhoc/zabbix_setup/oo-config-zaio.yml b/playbooks/adhoc/zabbix_setup/oo-config-zaio.yml
index e2b8150c6..ec28564cf 100755
--- a/playbooks/adhoc/zabbix_setup/oo-config-zaio.yml
+++ b/playbooks/adhoc/zabbix_setup/oo-config-zaio.yml
@@ -2,6 +2,8 @@
---
- hosts: localhost
gather_facts: no
+ connection: local
+ become: no
vars:
g_server: http://localhost/zabbix/api_jsonrpc.php
g_user: Admin