blob: 5f34ba7531546da5b97c9a6b4c9c8cdd858bcce1 [file] [log] [blame]
Zack Williamsf6cc0122018-03-30 16:00:49 -07001---
Matteo Scandolo3896c472017-08-01 13:31:42 -07002# 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
Zack Williamsfc102dd2016-03-01 17:31:30 -070016# roles/cloudlab-prep/tasks/main.yml
17
Zack Williamsef434f82016-04-07 17:15:39 -070018- name: create directories to mount extra filesystems
Zack Williams5ae57ef2016-04-12 14:01:58 -070019 file:
Andy Bavier3a1d0642016-07-01 14:11:39 -040020 dest={{ item.mount }}
Zack Williamsef434f82016-04-07 17:15:39 -070021 state=directory
22 with_items: "{{ cloudlab_extrafs }}"
23
Zack Williams2fa7ca42016-04-11 12:45:10 -070024# FIXME: does not create lost+found, -q makes it fail without error...
Zack Williamsef434f82016-04-07 17:15:39 -070025- name: Set up extra disk space
Andy Bavier3a1d0642016-07-01 14:11:39 -040026 command: /usr/testbed/bin/mkextrafs -r {{ item.dev }} -qf {{ item.mount }}
27 creates={{ item.mount }}/lost+found
Zack Williamsef434f82016-04-07 17:15:39 -070028 with_items: "{{ cloudlab_extrafs }}"
Andy Bavier66ee9012016-07-20 17:25:51 -040029 register: result
Zack Williamsf6cc0122018-03-30 16:00:49 -070030 until: result is success
Andy Bavier66ee9012016-07-20 17:25:51 -040031 retries: 3
32 delay: 5
Zack Williamsfc102dd2016-03-01 17:31:30 -070033
Andy Bavier69e20612016-11-14 05:52:31 -080034- name: Set up symlink targets
35 file:
36 path: "{{ item.src }}"
37 state: directory
38 with_items: "{{ cloudlab_links }}"
39
40- name: Create symlinks
41 file:
42 src: "{{ item.src }}"
43 dest: "{{ item.dest }}"
44 state: link
45 with_items: "{{ cloudlab_links }}"