summaryrefslogtreecommitdiffstats
path: root/examples/simple/deploy-simple.yaml
blob: 31242109244c364ecc79299eb37c9bc26c273009 (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Copyright (c) 2016 Cable Television Laboratories, Inc. ("CableLabs")
#                    and others.  All rights reserved.
#
# 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.
---
openstack:
  connection:
    # Note - when http_proxy is set, you must also configure ssh for proxy tunneling on your host.
    username: admin
    password: cable123
    auth_url: http://192.168.67.10:5000/v2.0
    project_name: admin
    http_proxy: 10.197.123.27:3128
    ssh_proxy_cmd: '/usr/local/bin/corkscrew 10.197.123.27 3128 %h %p'
  images:
    - image:
        name: Ubuntu14
        format: qcow2
        image_user: ubuntu
        download_url: http://uec-images.ubuntu.com/releases/trusty/14.04/ubuntu-14.04-server-cloudimg-amd64-disk1.img
  networks:
    - network:
        name: simple-net
        subnets:
          - subnet:
              name: simple-subnet
              cidr: 10.0.1.0/24
              dns_nameservers: [10.5.0.8, 8.8.8.8]
  routers:
    - router:
        name: simple-router
        external_gateway: external
        internal_subnets:
          - simple-subnet
  keypairs:
    - keypair:
        name: simple-kp
        public_filepath: /tmp/simple-kp.pub
        private_filepath: /tmp/simple-kp
  instances:
    - instance:
        name: simple-1
        flavor: m1.small
        imageName: Ubuntu14
        keypair_name: simple-kp
        userdata: "#cloud-config\npassword: cable123\nchpasswd: { expire: False }\nsshr_pwauth: True"
        ports:
          - port:
              name: simple-net-port
              network_name: simple-net
        floating_ips:
          - floating_ip:
              name: fip1
              port_name: simple-net-port
              router_name: simple-router
              subnet_name: simple-subnet
ansible:
    - playbook_location: main.yml
      hosts:
        - simple-1
      variables:
        greeting_msg:
          type: string
          value: Greetings
        os_user:
          type: os_creds
          value: username
        os_pass:
          type: os_creds
          value: password
        os_auth_url:
          type: os_creds
          value: auth_url
        os_project:
          type: os_creds
          value: project_name
        fip1:
          type: vm-attr
          vm_name: simple-1
          value: floating_ip
        mac1:
          type: port
          vm_name: simple-1
          port_name: simple-net-port
          port_value: mac_address
        ip1:
          type: port
          vm_name: simple-1
          port_name: simple-net-port
          port_value: ip_address