diff options
Diffstat (limited to 'deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_setup_env.yml')
-rw-r--r-- | deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_setup_env.yml | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_setup_env.yml b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_setup_env.yml deleted file mode 100644 index 7b3099e2..00000000 --- a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_setup_env.yml +++ /dev/null @@ -1,103 +0,0 @@ -############################################################################## -# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## ---- -- include_vars: "{{ ansible_os_family }}.yml" - -- name: copy rsa secret key from compass-core to host1 - copy: src=/root/.ssh/id_rsa dest=/root/.ssh/id_rsa mode=0600 - -- name: copy rsa pub key from compass-core to host1 - copy: src=/root/.ssh/id_rsa.pub dest=/root/.ssh/id_rsa.pub mode=0644 - -- name: gen ssh key for no-ask access to every nodes - shell: if [ ! -f ~/.ssh/id_rsa.pub ]; then ssh-keygen -q -t rsa -f ~/.ssh/id_rsa -N ""; else echo "already gen ssh key!"; fi; - -- name: copy key to node - shell: ssh-copy-id -i ~/.ssh/id_rsa.pub -o StrictHostKeyChecking=no root@{{ item }} - with_items: - - "{{ groups['all'] }}" - -- name: install ceph-related packages - action: "{{ ansible_pkg_mgr }} name={{ item }} state=present" - with_items: packages | union(packages_noarch) - -- name: clear cluster_hosts_name - file: path=cluster_hosts_name state=absent - tags: - - create_ceph_cluster - - ceph_install - -- name: clear cluster_controller_nodes - file: path=cluster_controller_nodes state=absent - tags: - - create_ceph_cluster - - ceph_install - -- name: clear ceph_mon_nodes - file: path=ceph_mon_nodes state=absent - tags: - - create_ceph_cluster - - ceph_install - -- name: echo hosts name to file - shell: echo -n "{{ item }} " >> cluster_hosts_name - with_items: - - "{{ groups['all'] }}" - tags: - - create_ceph_cluster - - ceph_install - -- name: register hosts name - shell: cat cluster_hosts_name - register: ceph_cluster_hosts - tags: - - create_ceph_cluster - - echo_hosts - - ceph_install - -- name: echo controller name to file - shell: echo -n "{{ item }} " >> cluster_controller_nodes - with_items: - - "{{ groups['controller'] }}" - tags: - - create_ceph_cluster - - ceph_install - -- name: register controller nodes - shell: cat cluster_controller_nodes - register: controller_nodes - tags: - - create_ceph_cluster - - echo_hosts - - ceph_install - -- name: echo ceph-mon name to file - shell: echo -n "{{ item }} " >> ceph_mon_nodes - with_items: - - "{{ groups['ceph_mon'] }}" - tags: - - create_ceph_cluster - - ceph_install - -- name: register ceph-mon nodes - shell: cat ceph_mon_nodes - register: mon_nodes - tags: - - create_ceph_cluster - - echo_hosts - - ceph_install - -- name: gen clean ceph script - template: src=clean_ceph.j2 dest=~/clean_ceph.sh mode=0777 - -- name: clean ceph data of last deploy - shell: ~/clean_ceph.sh - -- name: mkdir for ceph-cluster - file: path={{ ceph_cluster_dir[0] }} state=directory mode=0755 |