tripleo-ansible/examples/simple_iterative_applier/main.yml

34 lines
1.2 KiB
YAML

# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: rebuild an instance
hosts: localhost
vars:
os_username: "{{ lookup('env','OS_USERNAME') }}"
os_tenant_name: "{{ lookup('env','OS_TENANT_NAME') }}"
os_password: "{{ lookup('env','OS_PASSWORD') }}"
os_auth_url: "{{ lookup('env','OS_AUTH_URL') }}"
tasks:
- name: rebuild an instance
nova_rebuild:
region_name: regionOne
login_username: "{{ os_username }}"
login_password: "{{ os_password }}"
login_tenant_name: "{{ os_tenant_name}}"
auth_url: "{{ os_auth_url }}"
name: "{{ name }}"
image_id: "{{ image_id }}"
preserve_ephemeral: yes
wait_for: 300