Marcos Amorim
2020-03-04 923e3b3186498772aedee7a43f46b5aa8a4e27f4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
- name: Step 000 Pre Infrastructure
  hosts: localhost
  connection: local
  become: false
  tags:
  - step001
  - pre_infrastructure
  - osp_migration
  tasks:
    - name: Create migration host group
      add_host:
        name: "{{ import_host }}"
        group: "migration"
        ansible_user: "root"
        ansible_become: false
 
- name: Step 001 Migrating blueprints
  hosts: migration
  become: true
  gather_facts: true
  tags:
  - step001
  - pre_infrastructure
  - osp_migration
  tasks:
    - name: Download images from project
      environment:
        OS_AUTH_URL: "{{ osp_auth_url }}"
        OS_USERNAME: "{{ osp_auth_username }}"
        OS_PASSWORD: "{{ osp_auth_password }}"
        OS_PROJECT_NAME: "admin"
        OS_PROJECT_DOMAIN_ID: "{{ osp_auth_project_domain }}"
        OS_USER_DOMAIN_NAME: "{{ osp_auth_user_domain }}"
        PATH: "/root/.local/bin:{{ ansible_env.PATH }}"
        CEPH_CONF: "/etc/ceph/{{ ceph_cluster |default('red') }}.conf"
      convert_blueprint:
        ibm_endpoint: "{{ ibm_endpoint }}"
        ibm_auth_endpoint: "{{ ibm_auth_endpoint }}"
        ibm_api_key: "{{ ibm_api_key }}"
        ibm_resource_id: "{{ ibm_resource_id }}"
        bucket: "{{ ibm_bucket_name }}"
        project: "{{ project }}"
        output_dir: "{{ output_dir }}"
        mode: "download"
        glance_pool: "{{ ceph_cluster |default('red') }}-images"
        overwrite: "{{ overwrite_image | default('false') }}"