Configure CaaS SR-IOV and provider networks
[ta/infra-ansible.git] / roles / baremetal_provision / tasks / main.yml
1 ---
2
3 # Copyright 2019 Nokia
4
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
8 #
9 #     http://www.apache.org/licenses/LICENSE-2.0
10 #
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.
16
17
18 - include: convert_qcow_raw.yml
19   run_once: True
20
21 - name: Create vbmc ports for virtual hosts
22   include_tasks: vbmc_port_setup.yml
23   when: virtual_env
24
25 - name: Setup tmux
26   copy:
27     src: "tmux_setup"
28     dest: "/opt/"
29
30 - include_tasks: ironic_nodes_create.yml
31   tags:
32     - baremetal-ironic-nodes-create
33
34 - include_tasks: start_console_logging.yml
35   tags:
36     - baremetal-ironic-nodes-deploy
37   when: virtual_env == false
38
39 - include_tasks: ironic_nodes_deploy.yml
40   tags:
41     - baremetal-ironic-nodes-deploy
42   when: baremetal_ironic_node_id is defined
43
44 - name: Set Ironic node in maintenance.
45   os_ironic_node:
46     cloud: default
47     endpoint_type: internal
48     auth_type: password
49     uuid: "{{ironic_node_details.name}}"
50     maintenance: True
51     deploy: False
52   when:
53     - installation_phase != "provisioning-started"
54
55 - name: Set Ironic node in maintenance.
56   environment:
57     OS_AUTH_TOKEN: "fake-token"
58     IRONIC_URL: "{{ ironic_service_adminurl }}"
59   os_ironic_node:
60     auth:
61     auth_type: 'None'
62     ironic_url: "{{ ironic_service_adminurl }}"
63     uuid: "{{ironic_node_details.name}}"
64     maintenance: True
65     deploy: False
66   when:
67     - installation_phase == "provisioning-started"
68
69 - include_tasks: stop_console_logging.yml
70   tags:
71     - baremetal-ironic-nodes-deploy
72   when: virtual_env == false