Zack Williams | f6cc012 | 2018-03-30 16:00:49 -0700 | [diff] [blame] | 1 | --- |
Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 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 | |
Zack Williams | fc102dd | 2016-03-01 17:31:30 -0700 | [diff] [blame] | 16 | # roles/cloudlab-prep/tasks/main.yml |
| 17 | |
Zack Williams | ef434f8 | 2016-04-07 17:15:39 -0700 | [diff] [blame] | 18 | - name: create directories to mount extra filesystems |
Zack Williams | 5ae57ef | 2016-04-12 14:01:58 -0700 | [diff] [blame] | 19 | file: |
Andy Bavier | 3a1d064 | 2016-07-01 14:11:39 -0400 | [diff] [blame] | 20 | dest={{ item.mount }} |
Zack Williams | ef434f8 | 2016-04-07 17:15:39 -0700 | [diff] [blame] | 21 | state=directory |
| 22 | with_items: "{{ cloudlab_extrafs }}" |
| 23 | |
Zack Williams | 2fa7ca4 | 2016-04-11 12:45:10 -0700 | [diff] [blame] | 24 | # FIXME: does not create lost+found, -q makes it fail without error... |
Zack Williams | ef434f8 | 2016-04-07 17:15:39 -0700 | [diff] [blame] | 25 | - name: Set up extra disk space |
Andy Bavier | 3a1d064 | 2016-07-01 14:11:39 -0400 | [diff] [blame] | 26 | command: /usr/testbed/bin/mkextrafs -r {{ item.dev }} -qf {{ item.mount }} |
| 27 | creates={{ item.mount }}/lost+found |
Zack Williams | ef434f8 | 2016-04-07 17:15:39 -0700 | [diff] [blame] | 28 | with_items: "{{ cloudlab_extrafs }}" |
Andy Bavier | 66ee901 | 2016-07-20 17:25:51 -0400 | [diff] [blame] | 29 | register: result |
Zack Williams | f6cc012 | 2018-03-30 16:00:49 -0700 | [diff] [blame] | 30 | until: result is success |
Andy Bavier | 66ee901 | 2016-07-20 17:25:51 -0400 | [diff] [blame] | 31 | retries: 3 |
| 32 | delay: 5 |
Zack Williams | fc102dd | 2016-03-01 17:31:30 -0700 | [diff] [blame] | 33 | |
Andy Bavier | 69e2061 | 2016-11-14 05:52:31 -0800 | [diff] [blame] | 34 | - 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 }}" |