Merge "Fixed OSCreds retrieval."
[snaps.git] / examples / simple / deploy-simple.yaml
1 # Copyright (c) 2016 Cable Television Laboratories, Inc. ("CableLabs")
2 #                    and others.  All rights reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 ---
16 openstack:
17   connection:
18     # Note - when http_proxy is set, you must also configure ssh for proxy tunneling on your host.
19     username: admin
20     password: cable123
21     auth_url: http://192.168.67.10:5000/v2.0
22     project_name: admin
23     http_proxy: 10.197.123.27:3128
24     ssh_proxy_cmd: '/usr/local/bin/corkscrew 10.197.123.27 3128 %h %p'
25   images:
26     - image:
27         name: Ubuntu14
28         format: qcow2
29         image_user: ubuntu
30         download_url: http://uec-images.ubuntu.com/releases/trusty/14.04/ubuntu-14.04-server-cloudimg-amd64-disk1.img
31   networks:
32     - network:
33         name: simple-net
34         subnets:
35           - subnet:
36               name: simple-subnet
37               cidr: 10.0.1.0/24
38               dns_nameservers: [10.5.0.8, 8.8.8.8]
39   routers:
40     - router:
41         name: simple-router
42         external_gateway: external
43         internal_subnets:
44           - simple-subnet
45   keypairs:
46     - keypair:
47         name: simple-kp
48         public_filepath: /tmp/simple-kp.pub
49         private_filepath: /tmp/simple-kp
50   instances:
51     - instance:
52         name: simple-1
53         flavor: m1.small
54         imageName: Ubuntu14
55         keypair_name: simple-kp
56         userdata: "#cloud-config\npassword: cable123\nchpasswd: { expire: False }\nsshr_pwauth: True"
57         ports:
58           - port:
59               name: simple-net-port
60               network_name: simple-net
61         floating_ips:
62           - floating_ip:
63               name: fip1
64               port_name: simple-net-port
65               router_name: simple-router
66               subnet_name: simple-subnet
67 ansible:
68     - playbook_location: main.yml
69       hosts:
70         - simple-1
71       variables:
72         greeting_msg:
73           type: string
74           value: Greetings
75         os_user:
76           type: os_creds
77           value: username
78         os_pass:
79           type: os_creds
80           value: password
81         os_auth_url:
82           type: os_creds
83           value: auth_url
84         os_project:
85           type: os_creds
86           value: project_name
87         fip1:
88           type: vm-attr
89           vm_name: simple-1
90           value: floating_ip
91         mac1:
92           type: port
93           vm_name: simple-1
94           port_name: simple-net-port
95           port_value: mac_address
96         ip1:
97           type: port
98           vm_name: simple-1
99           port_name: simple-net-port
100           port_value: ip_address