hpc-cloud/post-install.yml

33 lines
1.4 KiB
YAML
Raw Normal View History

2017-08-28 11:50:27 +02:00
---
- hosts: all
name: Dummy to gather facts
tasks: []
- hosts: keystone
become: True
vars_files:
- settings.yml
tasks:
- name: copy public key
copy:
content: "{{ rsa_pub }}"
dest: /srv/keystone/root/id_rsa.pub
- name: post install configuration
command: docker exec -i keystone.service bash -c "source /root/admin-openrc.sh && {{ item }}"
with_items:
2018-07-25 10:38:44 +02:00
- openstack network create --share --external --provider-physical-network provider --provider-network-type vlan --provider-segment 983 vlan983
- >
2018-07-25 10:38:44 +02:00
openstack subnet create --subnet-range 172.23.41.0/24 --gateway 172.23.41.101
--network vlan983 --allocation-pool start=172.23.41.75,end=172.23.41.100
--dns-nameserver 8.8.8.8 vlan983_subnet
2017-08-28 11:50:27 +02:00
- openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano
- openstack keypair create --public-key /root/id_rsa.pub adminkey
2018-07-25 14:47:07 +02:00
- name: Install cirros image
get_url:
url: http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img
dest: /tmp/cirros-0.4.0-x86_64-disk.img
checksum: sha256:a8dd75ecffd4cdd96072d60c2237b448e0c8b2bc94d57f10fdbc8c481d9005b8
2018-07-26 13:26:10 +02:00
- shell: >
2018-07-25 14:47:07 +02:00
source source /srv/keystone/root/admin-openrc.sh &&
openstack image create --disk-format qcow2 cirros < cirros-0.4.0-x86_64-disk.img