blob: b4fecfa7239bc639662da6a3d506e9b91972678c [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Zack Williamsfc102dd2016-03-01 17:31:30 -070017---
18# roles/cloudlab-prep/tasks/main.yml
19
Zack Williamsef434f82016-04-07 17:15:39 -070020- name: create directories to mount extra filesystems
Zack Williams5ae57ef2016-04-12 14:01:58 -070021 file:
Andy Bavier3a1d0642016-07-01 14:11:39 -040022 dest={{ item.mount }}
Zack Williamsef434f82016-04-07 17:15:39 -070023 state=directory
24 with_items: "{{ cloudlab_extrafs }}"
25
26
Zack Williams2fa7ca42016-04-11 12:45:10 -070027# FIXME: does not create lost+found, -q makes it fail without error...
Zack Williamsef434f82016-04-07 17:15:39 -070028- name: Set up extra disk space
Andy Bavier3a1d0642016-07-01 14:11:39 -040029 command: /usr/testbed/bin/mkextrafs -r {{ item.dev }} -qf {{ item.mount }}
30 creates={{ item.mount }}/lost+found
Zack Williamsef434f82016-04-07 17:15:39 -070031 with_items: "{{ cloudlab_extrafs }}"
Andy Bavier66ee9012016-07-20 17:25:51 -040032 register: result
33 until: result | success
34 retries: 3
35 delay: 5
Zack Williamsfc102dd2016-03-01 17:31:30 -070036
Andy Bavier69e20612016-11-14 05:52:31 -080037- name: Set up symlink targets
38 file:
39 path: "{{ item.src }}"
40 state: directory
41 with_items: "{{ cloudlab_links }}"
42
43- name: Create symlinks
44 file:
45 src: "{{ item.src }}"
46 dest: "{{ item.dest }}"
47 state: link
48 with_items: "{{ cloudlab_links }}"