Compare commits

...

3 Commits

Author SHA1 Message Date
Egon Rijpkema 1b7eb26a75 Merge branch 'feature/add-variables' 2018-04-18 10:49:09 +02:00
Egon Rijpkema 99112894be Added mtu size variable 2018-04-18 10:46:42 +02:00
Egon Rijpkema 4e5c496862 Added configure_networks bool and mtu_size var 2018-04-16 17:07:17 +02:00
6 changed files with 36 additions and 5 deletions

View File

@ -5,5 +5,7 @@
- hosts: neutron-controller
become: True
vars_files:
- settings.yml
roles:
- neutron-controller

View File

@ -5,5 +5,7 @@
- hosts: nova-compute
become: True
vars_files:
- settings.yml
roles:
- nova-compute

View File

@ -20,7 +20,20 @@
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 }} providersub
when: "{{ configure_networks }}" == True
- 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 flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano
- openstack keypair create --public-key /root/id_rsa.pub adminkey

View File

@ -16,6 +16,7 @@
- set_fact:
env_vars: >
-e "GLOBAL_PHYSNET_MTU={{ global_physnet_mtu }}"
-e "KEYSTONE_HOST={{ listen_ip | default(hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address']) }}"
-e "MEMCACHED_HOST={{ listen_ip | default(hostvars[groups['memcached'][0]]['ansible_default_ipv4']['address']) }}"
-e "METADATA_SECRET={{ secrets['METADATA_SECRET'] }}"

View File

@ -10,6 +10,8 @@ ExecStartPre=-/usr/bin/docker kill %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStart=/usr/bin/docker run --name %n \
-e "GLANCE_CONTROLLER_HOST={{ hostvars[groups['glance-controller'][0]]['listen_ip'] | default(hostvars[groups['glance-controller'][0]]['ansible_default_ipv4']['address']) }}" \
-e "GLOBAL_PHYSNET_MTU={{ global_physnet_mtu }}" \
-e "GLOBAL_PHYSNET_MTU={{ global_physnet_mtu }}" \
-e "KEYSTONE_HOST={{ hostvars[groups['keystone'][0]]['listen_ip'] | default(hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address']) }}" \
-e "METADATA_SECRET={{ secrets['METADATA_SECRET'] }}" \
-e "MEMCACHED_HOST={{ hostvars[groups['memcached'][0]]['listen_ip'] | default(hostvars[groups['memcached'][0]]['ansible_default_ipv4']['address']) }}" \

View File

@ -1,4 +1,7 @@
---
- configure_networks: "True"
# Allocation pool for a flat provider network.
- allocation_pool:
start: 172.23.128.50
end: 172.23.128.249
@ -9,4 +12,12 @@
- 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
- global_physnet_mtu: 9000
- rsa_pub: >
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDStPUPXkcu81onUm/le54JCu174yXJJDsthDr9
6Mv8irBVBWuy5FxnaASuDpmC4QE4s0UAIg1iq/SWrr8qdBQ4OVuYFiW0S7ZJvcoKr/40Wh+T5Mel
tGQfmkDp6kBsfaMSo6M4tF1c8i+XgOgxb4fxHYb8mFhseztRLx6McxJJJLB0nu+T12WQ01nl0Xtw
D+3EsZWfxRH0KA59VHZSe3Anc5z+Fm7WU+1Vzy6/pkiIhVReI1L6VVhZsIdSu3fQK6fHQcujtfuw
6RKEpisZQqnxMUviWQ98yeQXHk6Nx840WCh3vvKveEAoC4Y/UEZa1TMe6PczfUaLjaidUkpulJsP
egon@egon-pc