5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 - name: Create /remote_image_share_root/ directory for virtmedia driver
19 path: "/remote_image_share_root/"
21 mode: u=rwx,g=rwx,o=rx
25 - name: Create entry in /etc/exports for other controllers /remote_image_share_root/
28 # Use infra_external subnet for now. When we have infra_hwmgmt support add logic to make choice later.
29 line: "/remote_image_share_root/ {{hostvars[item.key]['networking']['infra_external']['ip']}}(rw,sync,no_root_squash,no_subtree_check)"
31 with_dict: "{{hosts}}"
33 - '"controller" in item.value["service_profiles"]'
34 - hostvars[item.key] != inventory_hostname
35 - installation_phase != "provisioning-started"
37 label: "{{ item.key }}"
39 - name: Create access entries for BMC ports of all nodes in /etc/exports from /remote_image_share_root/
42 line: "/remote_image_share_root/ {{item.value['hwmgmt']['address']}}(ro,sync,no_root_squash,no_subtree_check)"
44 with_dict: "{{hosts}}"
46 label: "{{ item.key }}"
48 - name: Enable nfs-server
54 - name: Run exportfs command
55 command: "exportfs -a"