aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/storage
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2017-11-01 11:46:18 +0800
committerYifei Xue <xueyifei@huawei.com>2017-11-28 21:39:19 +0800
commit10361fd56fac5f7aebba44402bf9a501854d00c3 (patch)
tree205b76c0831e272e71dbef64c3c10ea332f13eea /deploy/adapters/ansible/roles/storage
parent9a76ddb1075479c891389a0c9303d80ead9895a0 (diff)
Upgrade OpenStack version from Ocata to Pike
JIRA: COMPASS-565 For OPNFV F release, it's going to use OpenStack Pike as the NFVI component. This task is created to monitor the upgrade work of OpenStack Pike. Subtasks as follow: - Add Pike related configurations to compass_conf - Upgrade ubuntu os to ubuntu 16.04.3 - Upgrade centos os to centos 7.4 - Upgrade openstack-ansible from ocata to pike - Upgrade openstack repos from ocata to pike Change-Id: I2202e8e3ae23dae8e575c89170c9e5e057757870 Signed-off-by: Yifei Xue <xueyifei@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/storage')
-rw-r--r--deploy/adapters/ansible/roles/storage/tasks/ceph.yml18
-rw-r--r--deploy/adapters/ansible/roles/storage/vars/Debian.yml3
-rw-r--r--deploy/adapters/ansible/roles/storage/vars/RedHat.yml3
-rw-r--r--deploy/adapters/ansible/roles/storage/vars/main.yml1
4 files changed, 24 insertions, 1 deletions
diff --git a/deploy/adapters/ansible/roles/storage/tasks/ceph.yml b/deploy/adapters/ansible/roles/storage/tasks/ceph.yml
index 50476c7b..0fc7c80b 100644
--- a/deploy/adapters/ansible/roles/storage/tasks/ceph.yml
+++ b/deploy/adapters/ansible/roles/storage/tasks/ceph.yml
@@ -12,6 +12,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+- include_vars: "{{ ansible_os_family }}.yml"
+
- name: Create sparse ceph OSD files
command: truncate -s {{ host_loopback_ceph_size }} /var/{{ item }}.img
args:
@@ -43,6 +45,7 @@
line: "losetup -f /var/{{ item }}.img"
insertbefore: "{{ rc_local_insert_before }}"
with_items: "{{ ceph_osd_images }}"
+ when: ansible_os_family == 'Debian'
- name: Create ceph partitions at boot time
lineinfile:
@@ -50,3 +53,18 @@
line: "partprobe -s {{ item }}"
insertbefore: "{{ rc_local_insert_before }}"
with_items: "{{ ceph_loopback.results | map(attribute='stdout') | list }}"
+ when: ansible_os_family == 'Debian'
+
+- name: Create ceph loopback at boot time
+ lineinfile:
+ dest: "{{ rc_local }}"
+ line: "losetup -f /var/{{ item }}.img"
+ with_items: "{{ ceph_osd_images }}"
+ when: ansible_os_family == 'RedHat'
+
+- name: Create ceph partitions at boot time
+ lineinfile:
+ dest: "{{ rc_local }}"
+ line: "partprobe -s {{ item }}"
+ with_items: "{{ ceph_loopback.results | map(attribute='stdout') | list }}"
+ when: ansible_os_family == 'RedHat'
diff --git a/deploy/adapters/ansible/roles/storage/vars/Debian.yml b/deploy/adapters/ansible/roles/storage/vars/Debian.yml
new file mode 100644
index 00000000..c1141f7b
--- /dev/null
+++ b/deploy/adapters/ansible/roles/storage/vars/Debian.yml
@@ -0,0 +1,3 @@
+---
+
+rc_local: /etc/rc.local
diff --git a/deploy/adapters/ansible/roles/storage/vars/RedHat.yml b/deploy/adapters/ansible/roles/storage/vars/RedHat.yml
new file mode 100644
index 00000000..ef59e1b4
--- /dev/null
+++ b/deploy/adapters/ansible/roles/storage/vars/RedHat.yml
@@ -0,0 +1,3 @@
+---
+
+rc_local: /etc/rc.d/rc.local
diff --git a/deploy/adapters/ansible/roles/storage/vars/main.yml b/deploy/adapters/ansible/roles/storage/vars/main.yml
index 28e2ad06..cbee9c1e 100644
--- a/deploy/adapters/ansible/roles/storage/vars/main.yml
+++ b/deploy/adapters/ansible/roles/storage/vars/main.yml
@@ -8,7 +8,6 @@
##############################################################################
---
host_loopback_ceph_size: "100G"
-rc_local: /etc/rc.local
rc_local_insert_before: "^exit 0$"
bootstrap_host_data_disk_device: null
bootstrap_host_data_disk_device_force: "no"