]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Move role variables to defaults 165/head
authorSébastien Han <sebastien.han@enovance.com>
Mon, 5 Jan 2015 23:13:10 +0000 (00:13 +0100)
committerSébastien Han <sebastien.han@enovance.com>
Mon, 5 Jan 2015 23:13:10 +0000 (00:13 +0100)
Following best practices from
http://docs.ansible.com/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable

Closes: #161
Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
12 files changed:
roles/ceph-common/defaults/main.yml [new file with mode: 0644]
roles/ceph-common/vars/main.yml [deleted file]
roles/ceph-mds/defaults/main.yml [new file with mode: 0644]
roles/ceph-mds/vars/main.yml [deleted file]
roles/ceph-mon/defaults/main.yml [new file with mode: 0644]
roles/ceph-mon/vars/main.yml [deleted file]
roles/ceph-osd/defaults/main.yml [new file with mode: 0644]
roles/ceph-osd/vars/main.yml [deleted file]
roles/ceph-radosgw/defaults/main.yml [new file with mode: 0644]
roles/ceph-radosgw/vars/main.yml [deleted file]
roles/haproxy/defaults/main.yml [new file with mode: 0644]
roles/haproxy/vars/main.yml [deleted file]

diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml
new file mode 100644 (file)
index 0000000..c04701f
--- /dev/null
@@ -0,0 +1,113 @@
+---\r
+# You can override vars by using host or group vars\r
+\r
+#########\r
+# INSTALL\r
+#########\r
+\r
+# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\\r
+\r
+# STABLE\r
+########\r
+\r
+# COMMUNITY VERSION\r
+ceph_stable: true # use ceph stable branch\r
+ceph_stable_key: https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc\r
+ceph_stable_release: giant # ceph stable release\r
+\r
+# This option is needed for _both_ stable and dev version, so please always fill the right version\r
+# # supported distros are el6, rhel6, f18, f19, opensuse12.2, sles11, centos7 (see http://ceph.com/rpm-firefly/)\r
+ceph_stable_redhat_distro: el7\r
+\r
+# ENTERPRISE VERSION\r
+ceph_stable_ice: false # use Inktank Ceph Enterprise\r
+#ceph_stable_ice_url: https://download.inktank.com/enterprise\r
+#ceph_stable_ice_temp_path: /opt/ICE/ceph-repo/\r
+#ceph_stable_ice_kmod: 3.10-0.1.20140702gitdc9ac62.el7.x86_64\r
+#ceph_stable_ice_distro: rhel7 # Please check the download website for the supported versions.\r
+#ceph_stable_ice_version: 1.2.2\r
+#ceph_stable_ice_kmod_version: 1.2\r
+#ceph_stable_ice_user: # htaccess user\r
+#ceph_stable_ice_password: # htaccess password\r
+\r
+# DEV\r
+# ###\r
+\r
+ceph_dev: false # use ceph development branch\r
+ceph_dev_key: https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc\r
+ceph_dev_branch: master # development branch you would like to use e.g: master, wip-hack\r
+\r
+# supported distros are centos6, centos7, fc17, fc18, fc19, fc20, fedora17, fedora18,\r
+# fedora19, fedora20, opensuse12, sles0. (see http://gitbuilder.ceph.com/).\r
+# For rhel, please pay attention to the versions: 'rhel6 3' or 'rhel 4', the fullname is _very_ important.\r
+ceph_dev_redhat_distro: centos7\r
+\r
+###############\r
+# CONFIGURATION\r
+###############\r
+\r
+## Ceph options\r
+#\r
+fsid: "{{ cluster_uuid.stdout }}"\r
+cephx: true\r
+cephx_require_signatures: true # Kernel RBD does NOT support signatures!\r
+cephx_cluster_require_signatures: true\r
+cephx_service_require_signatures: false\r
+disable_in_memory_logs: true\r
+\r
+## Monitor options\r
+#\r
+monitor_interface: eth1\r
+mon_osd_down_out_interval: 600\r
+mon_osd_min_down_reporters: 7 # number of OSDs per host + 1\r
+mon_clock_drift_allowed: .15\r
+mon_clock_drift_warn_backoff: 30\r
+mon_osd_full_ratio: .95\r
+mon_osd_nearfull_ratio: .85\r
+mon_osd_report_timeout: 300\r
+\r
+## OSD options\r
+#\r
+journal_size: 100\r
+pool_default_pg_num: 128\r
+pool_default_pgp_num: 128\r
+pool_default_size: 2\r
+pool_default_min_size: 1\r
+cluster_network: 192.168.42.0/24\r
+public_network: 192.168.42.0/24\r
+osd_mkfs_type: xfs\r
+osd_mkfs_options_xfs: -f -i size=2048\r
+osd_mount_options_xfs: noatime\r
+osd_mon_heartbeat_interval: 30\r
+# CRUSH\r
+pool_default_crush_rule: 0\r
+osd_crush_update_on_start: "true"\r
+# Object backend\r
+osd_objectstore: filestore\r
+# Performance tuning\r
+filestore_merge_threshold: 40\r
+filestore_split_multiple: 8\r
+osd_op_threads: 8\r
+filestore_op_threads: 8\r
+filestore_max_sync_interval: 5\r
+osd_max_scrubs: 1\r
+# Recovery tuning\r
+osd_recovery_max_active: 5\r
+osd_max_backfills: 2\r
+osd_recovery_op_priority: 2\r
+osd_recovery_max_chunk: 1048576\r
+osd_recovery_threads: 1\r
+\r
+## MDS options\r
+#\r
+mds: false # disable mds configuration in ceph.conf\r
+\r
+# Rados Gateway options\r
+#\r
+radosgw: false # referenced in monitor role too.\r
+#radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls\r
+\r
+## Testing mode\r
+# enable this mode _only_ when you have a single node\r
+# if you don't want it keep the option commented\r
+#common_single_host_mode: true\r
diff --git a/roles/ceph-common/vars/main.yml b/roles/ceph-common/vars/main.yml
deleted file mode 100644 (file)
index c04701f..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
----\r
-# You can override vars by using host or group vars\r
-\r
-#########\r
-# INSTALL\r
-#########\r
-\r
-# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\\r
-\r
-# STABLE\r
-########\r
-\r
-# COMMUNITY VERSION\r
-ceph_stable: true # use ceph stable branch\r
-ceph_stable_key: https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc\r
-ceph_stable_release: giant # ceph stable release\r
-\r
-# This option is needed for _both_ stable and dev version, so please always fill the right version\r
-# # supported distros are el6, rhel6, f18, f19, opensuse12.2, sles11, centos7 (see http://ceph.com/rpm-firefly/)\r
-ceph_stable_redhat_distro: el7\r
-\r
-# ENTERPRISE VERSION\r
-ceph_stable_ice: false # use Inktank Ceph Enterprise\r
-#ceph_stable_ice_url: https://download.inktank.com/enterprise\r
-#ceph_stable_ice_temp_path: /opt/ICE/ceph-repo/\r
-#ceph_stable_ice_kmod: 3.10-0.1.20140702gitdc9ac62.el7.x86_64\r
-#ceph_stable_ice_distro: rhel7 # Please check the download website for the supported versions.\r
-#ceph_stable_ice_version: 1.2.2\r
-#ceph_stable_ice_kmod_version: 1.2\r
-#ceph_stable_ice_user: # htaccess user\r
-#ceph_stable_ice_password: # htaccess password\r
-\r
-# DEV\r
-# ###\r
-\r
-ceph_dev: false # use ceph development branch\r
-ceph_dev_key: https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc\r
-ceph_dev_branch: master # development branch you would like to use e.g: master, wip-hack\r
-\r
-# supported distros are centos6, centos7, fc17, fc18, fc19, fc20, fedora17, fedora18,\r
-# fedora19, fedora20, opensuse12, sles0. (see http://gitbuilder.ceph.com/).\r
-# For rhel, please pay attention to the versions: 'rhel6 3' or 'rhel 4', the fullname is _very_ important.\r
-ceph_dev_redhat_distro: centos7\r
-\r
-###############\r
-# CONFIGURATION\r
-###############\r
-\r
-## Ceph options\r
-#\r
-fsid: "{{ cluster_uuid.stdout }}"\r
-cephx: true\r
-cephx_require_signatures: true # Kernel RBD does NOT support signatures!\r
-cephx_cluster_require_signatures: true\r
-cephx_service_require_signatures: false\r
-disable_in_memory_logs: true\r
-\r
-## Monitor options\r
-#\r
-monitor_interface: eth1\r
-mon_osd_down_out_interval: 600\r
-mon_osd_min_down_reporters: 7 # number of OSDs per host + 1\r
-mon_clock_drift_allowed: .15\r
-mon_clock_drift_warn_backoff: 30\r
-mon_osd_full_ratio: .95\r
-mon_osd_nearfull_ratio: .85\r
-mon_osd_report_timeout: 300\r
-\r
-## OSD options\r
-#\r
-journal_size: 100\r
-pool_default_pg_num: 128\r
-pool_default_pgp_num: 128\r
-pool_default_size: 2\r
-pool_default_min_size: 1\r
-cluster_network: 192.168.42.0/24\r
-public_network: 192.168.42.0/24\r
-osd_mkfs_type: xfs\r
-osd_mkfs_options_xfs: -f -i size=2048\r
-osd_mount_options_xfs: noatime\r
-osd_mon_heartbeat_interval: 30\r
-# CRUSH\r
-pool_default_crush_rule: 0\r
-osd_crush_update_on_start: "true"\r
-# Object backend\r
-osd_objectstore: filestore\r
-# Performance tuning\r
-filestore_merge_threshold: 40\r
-filestore_split_multiple: 8\r
-osd_op_threads: 8\r
-filestore_op_threads: 8\r
-filestore_max_sync_interval: 5\r
-osd_max_scrubs: 1\r
-# Recovery tuning\r
-osd_recovery_max_active: 5\r
-osd_max_backfills: 2\r
-osd_recovery_op_priority: 2\r
-osd_recovery_max_chunk: 1048576\r
-osd_recovery_threads: 1\r
-\r
-## MDS options\r
-#\r
-mds: false # disable mds configuration in ceph.conf\r
-\r
-# Rados Gateway options\r
-#\r
-radosgw: false # referenced in monitor role too.\r
-#radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls\r
-\r
-## Testing mode\r
-# enable this mode _only_ when you have a single node\r
-# if you don't want it keep the option commented\r
-#common_single_host_mode: true\r
diff --git a/roles/ceph-mds/defaults/main.yml b/roles/ceph-mds/defaults/main.yml
new file mode 100644 (file)
index 0000000..bd46d3b
--- /dev/null
@@ -0,0 +1,4 @@
+---\r
+# You can override vars by using host or group vars\r
+\r
+cephx: true\r
diff --git a/roles/ceph-mds/vars/main.yml b/roles/ceph-mds/vars/main.yml
deleted file mode 100644 (file)
index bd46d3b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
----\r
-# You can override vars by using host or group vars\r
-\r
-cephx: true\r
diff --git a/roles/ceph-mon/defaults/main.yml b/roles/ceph-mon/defaults/main.yml
new file mode 100644 (file)
index 0000000..c0c2c11
--- /dev/null
@@ -0,0 +1,11 @@
+---\r
+# You can override vars by using host or group vars\r
+\r
+# ACTIVATE BOTH FSID AND MONITOR_SECRET VARIABLES FOR NON-VAGRANT DEPLOYMENT\r
+fsid: "{{ cluster_uuid.stdout }}"\r
+# monitor_secret:\r
+cephx: true\r
+\r
+# Rados Gateway options\r
+# referenced in common role too.\r
+radosgw: false\r
diff --git a/roles/ceph-mon/vars/main.yml b/roles/ceph-mon/vars/main.yml
deleted file mode 100644 (file)
index c0c2c11..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
----\r
-# You can override vars by using host or group vars\r
-\r
-# ACTIVATE BOTH FSID AND MONITOR_SECRET VARIABLES FOR NON-VAGRANT DEPLOYMENT\r
-fsid: "{{ cluster_uuid.stdout }}"\r
-# monitor_secret:\r
-cephx: true\r
-\r
-# Rados Gateway options\r
-# referenced in common role too.\r
-radosgw: false\r
diff --git a/roles/ceph-osd/defaults/main.yml b/roles/ceph-osd/defaults/main.yml
new file mode 100644 (file)
index 0000000..06b9312
--- /dev/null
@@ -0,0 +1,87 @@
+---\r
+# You can override default vars defined in defaults/main.yml here,\r
+# but I would advice to use host or group vars instead\r
+\r
+## Ceph options\r
+#\r
+\r
+# ACTIVATE THE FSID VARIABLE FOR NON-VAGRANT DEPLOYMENT\r
+fsid: "{{ cluster_uuid.stdout }}"\r
+cephx: true\r
+\r
+# Devices to be used as OSDs\r
+# You can pre-provision disks that are not present yet.\r
+# Ansible will just skip them. Newly added disk will be\r
+# automatically configured during the next run.\r
+#\r
+\r
+\r
+# !! WARNING !!\r
+#\r
+# /!\ ENABLE ONLY ONE SCENARIO AT A TIME /!\\r
+#\r
+# !! WARNING !!\r
+\r
+# USE WITH CAUTION\r
+# Erase partitions structure and layout of the given devices below prior to prepare them\r
+zap_devices: false\r
+\r
+# Declare devices\r
+# All the scenarii inherit from the following device declaration\r
+#\r
+devices:\r
+  - /dev/sdb\r
+  - /dev/sdc\r
+  - /dev/sdd\r
+  - /dev/sde\r
+\r
+# Device discovery is based on the Ansible fact 'ansible_devices'\r
+# which reports all the devices on a system. If chosen all the disks\r
+# found will be passed to ceph-disk. You should not be worried on using\r
+# this option since ceph-disk has a built-in check which looks for empty devices.\r
+# Thus devices with existing partition tables will not be used.\r
+# This mode prevents you from filling out the 'devices' variable above.\r
+#\r
+osd_auto_discovery: false\r
+\r
+# I. First scenario: journal and osd_data on the same device\r
+# Use 'true' to enable this scenario\r
+# This will collocate both journal and data on the same disk\r
+# creating a partition at the beginning of the device\r
+\r
+journal_collocation: true\r
+\r
+\r
+# II. Second scenario: single journal device for N OSDs\r
+# Use 'true' to enable this scenario\r
+\r
+# deprecated, please use scenario III with a single raw_journal_device\r
+\r
+\r
+# III. Third scenario: N journal devices for N OSDs\r
+# Use 'true' to enable this scenario\r
+#\r
+# In the following example:\r
+# * sdd and sde will get sdb as a journal\r
+# * sdf and sdg will get sdc as a journal\r
+# While starting you have 2 options:\r
+# 1. Pre-allocate all the devices\r
+# 2. Progressively add new devices\r
+\r
+raw_multi_journal: false\r
+raw_journal_devices:\r
+  - /dev/sdb\r
+  - /dev/sdb\r
+  - /dev/sdc\r
+  - /dev/sdc\r
+\r
+\r
+# IV. Fourth scenario: use directory instead of disk for OSDs\r
+# Use 'true' to enable this scenario\r
+\r
+osd_directory: false\r
+osd_directories:\r
+  - /var/lib/ceph/osd/mydir1\r
+  - /var/lib/ceph/osd/mydir2\r
+  - /var/lib/ceph/osd/mydir3\r
+  - /var/lib/ceph/osd/mydir4\r
diff --git a/roles/ceph-osd/vars/main.yml b/roles/ceph-osd/vars/main.yml
deleted file mode 100644 (file)
index 06b9312..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
----\r
-# You can override default vars defined in defaults/main.yml here,\r
-# but I would advice to use host or group vars instead\r
-\r
-## Ceph options\r
-#\r
-\r
-# ACTIVATE THE FSID VARIABLE FOR NON-VAGRANT DEPLOYMENT\r
-fsid: "{{ cluster_uuid.stdout }}"\r
-cephx: true\r
-\r
-# Devices to be used as OSDs\r
-# You can pre-provision disks that are not present yet.\r
-# Ansible will just skip them. Newly added disk will be\r
-# automatically configured during the next run.\r
-#\r
-\r
-\r
-# !! WARNING !!\r
-#\r
-# /!\ ENABLE ONLY ONE SCENARIO AT A TIME /!\\r
-#\r
-# !! WARNING !!\r
-\r
-# USE WITH CAUTION\r
-# Erase partitions structure and layout of the given devices below prior to prepare them\r
-zap_devices: false\r
-\r
-# Declare devices\r
-# All the scenarii inherit from the following device declaration\r
-#\r
-devices:\r
-  - /dev/sdb\r
-  - /dev/sdc\r
-  - /dev/sdd\r
-  - /dev/sde\r
-\r
-# Device discovery is based on the Ansible fact 'ansible_devices'\r
-# which reports all the devices on a system. If chosen all the disks\r
-# found will be passed to ceph-disk. You should not be worried on using\r
-# this option since ceph-disk has a built-in check which looks for empty devices.\r
-# Thus devices with existing partition tables will not be used.\r
-# This mode prevents you from filling out the 'devices' variable above.\r
-#\r
-osd_auto_discovery: false\r
-\r
-# I. First scenario: journal and osd_data on the same device\r
-# Use 'true' to enable this scenario\r
-# This will collocate both journal and data on the same disk\r
-# creating a partition at the beginning of the device\r
-\r
-journal_collocation: true\r
-\r
-\r
-# II. Second scenario: single journal device for N OSDs\r
-# Use 'true' to enable this scenario\r
-\r
-# deprecated, please use scenario III with a single raw_journal_device\r
-\r
-\r
-# III. Third scenario: N journal devices for N OSDs\r
-# Use 'true' to enable this scenario\r
-#\r
-# In the following example:\r
-# * sdd and sde will get sdb as a journal\r
-# * sdf and sdg will get sdc as a journal\r
-# While starting you have 2 options:\r
-# 1. Pre-allocate all the devices\r
-# 2. Progressively add new devices\r
-\r
-raw_multi_journal: false\r
-raw_journal_devices:\r
-  - /dev/sdb\r
-  - /dev/sdb\r
-  - /dev/sdc\r
-  - /dev/sdc\r
-\r
-\r
-# IV. Fourth scenario: use directory instead of disk for OSDs\r
-# Use 'true' to enable this scenario\r
-\r
-osd_directory: false\r
-osd_directories:\r
-  - /var/lib/ceph/osd/mydir1\r
-  - /var/lib/ceph/osd/mydir2\r
-  - /var/lib/ceph/osd/mydir3\r
-  - /var/lib/ceph/osd/mydir4\r
diff --git a/roles/ceph-radosgw/defaults/main.yml b/roles/ceph-radosgw/defaults/main.yml
new file mode 100644 (file)
index 0000000..e4c31ef
--- /dev/null
@@ -0,0 +1,14 @@
+---\r
+# You can override vars by using host or group vars\r
+\r
+## Ceph options\r
+#\r
+cephx: true\r
+\r
+# Toggle 100-continue support for Apache and FastCGI\r
+# WARNING: Changing this value will cause an outage of Apache while it is reinstalled on RGW nodes\r
+http_100_continue: false\r
+\r
+# Rados Gateway options\r
+redhat_distro_ceph_extra: centos6.4 # supported distros are centos6.3, centos6.4, centos6, fedora18, fedora19, opensuse12.2, rhel6.3, rhel6.4, rhel6.5, rhel6, sles11sp2\r
+email_address: foo@bar.com\r
diff --git a/roles/ceph-radosgw/vars/main.yml b/roles/ceph-radosgw/vars/main.yml
deleted file mode 100644 (file)
index e4c31ef..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
----\r
-# You can override vars by using host or group vars\r
-\r
-## Ceph options\r
-#\r
-cephx: true\r
-\r
-# Toggle 100-continue support for Apache and FastCGI\r
-# WARNING: Changing this value will cause an outage of Apache while it is reinstalled on RGW nodes\r
-http_100_continue: false\r
-\r
-# Rados Gateway options\r
-redhat_distro_ceph_extra: centos6.4 # supported distros are centos6.3, centos6.4, centos6, fedora18, fedora19, opensuse12.2, rhel6.3, rhel6.4, rhel6.5, rhel6, sles11sp2\r
-email_address: foo@bar.com\r
diff --git a/roles/haproxy/defaults/main.yml b/roles/haproxy/defaults/main.yml
new file mode 100644 (file)
index 0000000..bee3911
--- /dev/null
@@ -0,0 +1,5 @@
+---\r
+# You can override vars by using host or group vars\r
+\r
+# Rados Gateway options\r
+radosgw_interface: eth1 # the public interface which the radosgw talks to the world with, this variable is used in the haproxy role, this does not need to be set if haproxy is not used.\r
diff --git a/roles/haproxy/vars/main.yml b/roles/haproxy/vars/main.yml
deleted file mode 100644 (file)
index bee3911..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
----\r
-# You can override vars by using host or group vars\r
-\r
-# Rados Gateway options\r
-radosgw_interface: eth1 # the public interface which the radosgw talks to the world with, this variable is used in the haproxy role, this does not need to be set if haproxy is not used.\r