-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64f44d9
commit 2b0f487
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
export RAX_CREDS_FILE=$(grep rax_credentials_file playbooks/group_vars/all|cut -d"'" -f2) | ||
export RAX_REGION=$(grep rax_region playbooks/group_vars/all|cut -d"'" -f2) | ||
|
||
ansible-playbook -vvv -i inventory/rax.py playbooks/remove_cloudera.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
- include: create_groups.yml | ||
|
||
- name: "remove clouder-agent role to all nodes" | ||
hosts: hadoop-cluster | ||
any_errors_fatal: true | ||
become: yes | ||
pre_tasks: | ||
- name: "Show hadoop-cluster info" | ||
debug: var="{{ hostvars[inventory_hostname] }}" | ||
when: debug | ||
tasks: | ||
- name: "remove agent" | ||
yum: name='cloudera-manager-agent' state=removed | ||
|
||
- name: "drop scm mysql mysql db on master nodes" | ||
hosts: master-nodes | ||
any_errors_fatal: true | ||
become: yes | ||
pre_tasks: | ||
- name: "Show cluster info" | ||
debug: var="{{ hostvars[inventory_hostname] }}" | ||
when: debug | ||
tasks: | ||
- name: 'remove scm db from master nodes' | ||
mysql_db: name='scm' state=absent | ||
|
||
- name: "remove cloudera-mngr role to cm-node group" | ||
hosts: cm-node | ||
become: yes | ||
pre_tasks: | ||
- name: "Show cluster info" | ||
debug: var="{{ hostvars[inventory_hostname] }}" | ||
when: debug | ||
tasks: | ||
- name: "remove cloudera manager" | ||
yum: name={{ item }} state=removed | ||
with_items: | ||
- cloudera-manager-server | ||
- cloudera-manager-daemons |