added post install settings
This commit is contained in:
parent
233a9debc7
commit
b148b04a0b
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
- 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:
|
||||||
|
- openstack network create --share --external --provider-physical-network provider --provider-network-type flat provider
|
||||||
|
- >
|
||||||
|
openstack subnet create --network provider
|
||||||
|
--allocation-pool start={{ allocation_pool['start'] }},end={{ allocation_pool['end'] }}
|
||||||
|
--dns-nameserver {{ dns_nameserver }} --gateway {{ gateway }} --subnet-range {{ subnet_range }} provider
|
||||||
|
- openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano
|
||||||
|
- openstack keypair create --public-key /root/id_rsa.pub adminkey
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
- allocation_pool:
|
||||||
|
start: 172.23.128.50
|
||||||
|
end: 172.23.128.249
|
||||||
|
|
||||||
|
- dns_nameserver: 129.125.4.6
|
||||||
|
|
||||||
|
- gateway: 172.23.128.250
|
||||||
|
|
||||||
|
- subnet_range: 172.23.128.0/24
|
||||||
|
|
||||||
|
- rsa_pub: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDStPUPXkcu81onUm/le54JCu174yXJJDsthDr96Mv8irBVBWuy5FxnaASuDpmC4QE4s0UAIg1iq/SWrr8qdBQ4OVuYFiW0S7ZJvcoKr/40Wh+T5MeltGQfmkDp6kBsfaMSo6M4tF1c8i+XgOgxb4fxHYb8mFhseztRLx6McxJJJLB0nu+T12WQ01nl0XtwD+3EsZWfxRH0KA59VHZSe3Anc5z+Fm7WU+1Vzy6/pkiIhVReI1L6VVhZsIdSu3fQK6fHQcujtfuw6RKEpisZQqnxMUviWQ98yeQXHk6Nx840WCh3vvKveEAoC4Y/UEZa1TMe6PczfUaLjaidUkpulJsP egon@egon-pc
|
Loading…
Reference in New Issue