123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- ---
- - hosts: localhost
- gather_facts: no
- tasks:
- - name: provision resource group
- import_tasks: tasks/provision_instance.yml
- vars:
- image_prefix: "{{ openshift_azure_input_image_prefix }}"
- image_resource_group: "{{ openshift_azure_input_image_ns }}"
- - hosts: nodes
- tasks:
- - name: calculate yum repositories
- set_fact:
- openshift_additional_repos: "{{ azure_base_repos[ansible_distribution] }}"
- - name: configure yum repositories
- import_tasks: tasks/yum_certs.yml
- - name: update rpms
- import_role:
- name: os_update_latest
- vars:
- os_update_latest_reboot: True
- - name: deconfigure yum repositories
- import_tasks: tasks/remove_yum.yml
- - name: run waagent deprovision
- command: waagent -deprovision+user -force
- args:
- chdir: /
- - hosts: localhost
- gather_facts: no
- tasks:
- - name: get current date/time
- shell: TZ=Etc/UTC date +%Y%m%d%H%M
- register: now
- - set_fact:
- image_name: "{{ openshift_azure_output_image_prefix }}-{{ now.stdout }}"
- - name: create image
- import_tasks: tasks/create_image_from_vm.yml
- vars:
- image_resource_group: "{{ openshift_azure_output_image_ns }}"
- image_tags:
- root_image: "{{ (input_image.stdout | from_json).name }}"
- kernel: "{{ hostvars[groups['nodes'][0]]['ansible_kernel'] }}"
- - name: create blob
- import_tasks: tasks/create_blob_from_vm.yml
- when: openshift_azure_storage_account is defined and openshift_azure_storage_account
|