summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles
diff options
context:
space:
mode:
authorshuai chen <chenshuai@huawei.com>2016-01-07 01:59:38 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-07 01:59:39 +0000
commit27eeb7273c0660435ab27c1496a86502c5781479 (patch)
tree9a61845d6f12421612c75fa3553bee1553180286 /deploy/adapters/ansible/roles
parent42dada9add35c048f1f146e339ce226ae683fe44 (diff)
parent18eacaad81d7c72d612b7bd6d5b46c147c376bcc (diff)
Merge "Update ini config of ceph with ini module"
Diffstat (limited to 'deploy/adapters/ansible/roles')
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml11
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml11
2 files changed, 20 insertions, 2 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml
index 79388f74..77d0bc53 100644
--- a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml
+++ b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_Debian.yml
@@ -5,7 +5,16 @@
- create_ceph_cluster
- name: default config for ceph
- shell: cd {{ ceph_cluster_dir[0] }} && echo "osd_journal_size = 1024" >> ceph.conf && echo "osd_pool_default_size = 2" >> ceph.conf && echo "public_network = {{ mgmt_cidr }}" >> ceph.conf && echo "cluster_network = {{ storage_cidr }} " >> ceph.conf
+ ini_file:
+ dest: "{{ ceph_cluster_dir[0] }}/ceph.conf"
+ section: "{{ item.section }}"
+ option: "{{ item.option }}"
+ value: "{{ item.value }}"
+ with_items:
+ - { section: "global", option: "osd_journal_size", value: "1024" }
+ - { section: "global", option: "osd_pool_default_size", value: "2" }
+ - { section: "global", option: "public_network", value: "{{ mgmt_cidr }}" }
+ - { section: "global", option: "cluster_network", value: "{{ storage_cidr }}" }
- name: install ceph for every nodes includes jumpserver
shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy install {{ ceph_cluster_hosts.stdout_lines[0]}}
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml
index 05f70bdc..aa6f8ba5 100644
--- a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml
+++ b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml
@@ -5,7 +5,16 @@
- create_ceph_cluster
- name: default config for ceph
- shell: cd {{ ceph_cluster_dir[0] }} && echo "osd_journal_size = 1024" >> ceph.conf && echo "osd_pool_default_size = 2" >> ceph.conf && echo "public_network = {{ mgmt_cidr }}" >> ceph.conf && echo "cluster_network = {{ storage_cidr }} " >> ceph.conf
+ ini_file:
+ dest: "{{ ceph_cluster_dir[0] }}/ceph.conf"
+ section: "{{ item.section }}"
+ option: "{{ item.option }}"
+ value: "{{ item.value }}"
+ with_items:
+ - { section: "global", option: "osd_journal_size", value: "1024" }
+ - { section: "global", option: "osd_pool_default_size", value: "2" }
+ - { section: "global", option: "public_network", value: "{{ mgmt_cidr }}" }
+ - { section: "global", option: "cluster_network", value: "{{ storage_cidr }}" }
- name: install ceph for every nodes includes jumpserver
shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy install --no-adjust-repos --repo-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa --gpg-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa/ceph_key_release.asc {{ ceph_cluster_hosts.stdout_lines[0]}}