Fix hardcode for ubuntu apt-key
patch2: make ansible code follow lint. patch2: some of the 'shell' command will be replaced with ansible built-in 'script' in a separate CL. Change-Id: I010fbf89d7393c2ba1bee06dca36196fe5cc7006
This commit is contained in:
parent
996126dfbd
commit
410a9c480d
@ -40,6 +40,7 @@ EXTERNAL_NETWORK_GATEWAY: 203.0.113.1
|
|||||||
FLOATING_IP_START: 203.0.113.101
|
FLOATING_IP_START: 203.0.113.101
|
||||||
FLOATING_IP_END: 203.0.113.200
|
FLOATING_IP_END: 203.0.113.200
|
||||||
|
|
||||||
|
juno_cloud_archive: deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/juno main
|
||||||
build_in_image: http://cdn.download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img
|
build_in_image: http://cdn.download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img
|
||||||
build_in_image_name: cirros-0.3.3-x86_64-disk.img
|
build_in_image_name: cirros-0.3.3-x86_64-disk.img
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
stat: path={{ physical_device }}
|
stat: path={{ physical_device }}
|
||||||
register: st
|
register: st
|
||||||
|
|
||||||
- name: repace physical_device with /dev/loop if st returns false
|
- name: repace physical_device if st is false
|
||||||
local_action: copy src=loop.yml dest=/tmp/loop.yml
|
local_action: copy src=loop.yml dest=/tmp/loop.yml
|
||||||
when: st.stat.exists == False
|
when: st.stat.exists == False
|
||||||
|
|
||||||
@ -26,7 +26,8 @@
|
|||||||
register: partition_size
|
register: partition_size
|
||||||
|
|
||||||
- name: if not mounted, mount it
|
- name: if not mounted, mount it
|
||||||
shell: dd if=/dev/zero of=/mnt/cinder-volumes bs=1 count=0 seek={{ partition_size.stdout }}
|
shell: dd if=/dev/zero of=/mnt/cinder-volumes
|
||||||
|
bs=1 count=0 seek={{ partition_size.stdout }}
|
||||||
when: cindervolumes.stdout != 'cinder-volumes'
|
when: cindervolumes.stdout != 'cinder-volumes'
|
||||||
|
|
||||||
- name: get first lo device
|
- name: get first lo device
|
||||||
@ -39,10 +40,12 @@
|
|||||||
when: cindervolumes.stdout != 'cinder-volumes'
|
when: cindervolumes.stdout != 'cinder-volumes'
|
||||||
|
|
||||||
- name: create physical and group volumes
|
- name: create physical and group volumes
|
||||||
lvg: vg=cinder-volumes pvs={{ physical_device }} vg_options=--force
|
lvg: vg=cinder-volumes pvs={{ physical_device }}
|
||||||
|
vg_options=--force
|
||||||
|
|
||||||
- name: upload cinder-volume configuration
|
- name: upload cinder-volume configuration
|
||||||
template: src=cinder.conf dest=/etc/cinder/cinder.conf backup=yes
|
template: src=cinder.conf dest=/etc/cinder/cinder.conf
|
||||||
|
backup=yes
|
||||||
notify:
|
notify:
|
||||||
- restart cinder-volume
|
- restart cinder-volume
|
||||||
- restart tgt
|
- restart tgt
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: add juno cloudarchive
|
- name: install ubuntu-cloud-keyring(ubuntu)
|
||||||
apt_repository: repo='deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/juno main' state=present
|
apt: name={{ item }} state=latest
|
||||||
|
with_items:
|
||||||
|
- ubuntu-cloud-keyring
|
||||||
|
|
||||||
- name: add juno apt key
|
- name: add juno cloudarchive
|
||||||
apt_key: keyserver=keyserver.ubuntu.com id=5EDB1B62EC4926EA
|
apt_repository: repo={{ juno_cloud_archive }} state=present
|
||||||
|
|
||||||
- name: update packages once
|
- name: update packages once
|
||||||
apt: update_cache=yes
|
apt: update_cache=yes
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
# backup=yes
|
# backup=yes
|
||||||
|
|
||||||
- name: update horizon settings
|
- name: update horizon settings
|
||||||
template: src=local_settings.py dest=/etc/openstack-dashboard/local_settings.py
|
template: src=local_settings.py
|
||||||
|
dest=/etc/openstack-dashboard/local_settings.py
|
||||||
backup=yes
|
backup=yes
|
||||||
|
|
||||||
- name: restart apache2
|
- name: restart apache2
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
notify:
|
notify:
|
||||||
- restart mysql
|
- restart mysql
|
||||||
|
|
||||||
- name: manually restart mysql server first before creating db models
|
- name: manually restart mysql server
|
||||||
service: name=mysql
|
service: name=mysql
|
||||||
state=restarted
|
state=restarted
|
||||||
|
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
- python-glanceclient
|
- python-glanceclient
|
||||||
|
|
||||||
- name: update glance conf
|
- name: update glance conf
|
||||||
template: src={{ item }} dest=/etc/glance/{{ item }} backup=yes
|
template: src={{ item }} dest=/etc/glance/{{ item }}
|
||||||
|
backup=yes
|
||||||
with_items:
|
with_items:
|
||||||
- glance-api.conf
|
- glance-api.conf
|
||||||
- glance-registry.conf
|
- glance-registry.conf
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: activate ipv4 forwarding
|
- name: activate ipv4 forwarding
|
||||||
sysctl: name=net.ipv4.ip_forward value=1 state=present reload=yes
|
sysctl: name=net.ipv4.ip_forward value=1
|
||||||
|
state=present reload=yes
|
||||||
|
|
||||||
- name: deactivate ipv4 rp filter
|
- name: deactivate ipv4 rp filter
|
||||||
sysctl: name=net.ipv4.conf.all.rp_filter value=0 state=present reload=yes
|
sysctl: name=net.ipv4.conf.all.rp_filter value=0
|
||||||
|
state=present reload=yes
|
||||||
|
|
||||||
- name: deactivate ipv4 default rp filter
|
- name: deactivate ipv4 default rp filter
|
||||||
sysctl: name=net.ipv4.conf.default.rp_filter value=0 state=present reload=yes
|
sysctl: name=net.ipv4.conf.default.rp_filter
|
||||||
|
value=0 state=present reload=yes
|
||||||
|
|
||||||
- name: install compute-related neutron packages
|
- name: install compute-related neutron packages
|
||||||
apt: name={{ item }} state=present force=yes
|
apt: name={{ item }} state=present force=yes
|
||||||
@ -18,16 +21,20 @@
|
|||||||
- openvswitch-switch
|
- openvswitch-switch
|
||||||
|
|
||||||
- name: install neutron openvswitch agent
|
- name: install neutron openvswitch agent
|
||||||
apt: name=neutron-plugin-openvswitch-agent state=present force=yes
|
apt: name=neutron-plugin-openvswitch-agent
|
||||||
|
state=present force=yes
|
||||||
when: "'opendaylight' not in {{ NEUTRON_MECHANISM_DRIVERS }}"
|
when: "'opendaylight' not in {{ NEUTRON_MECHANISM_DRIVERS }}"
|
||||||
|
|
||||||
- name: config neutron
|
- name: config neutron
|
||||||
template: src=neutron-network.conf dest=/etc/neutron/neutron.conf backup=yes
|
template: src=neutron-network.conf
|
||||||
|
dest=/etc/neutron/neutron.conf backup=yes
|
||||||
notify:
|
notify:
|
||||||
- restart neutron-plugin-openvswitch-agent
|
- restart neutron-plugin-openvswitch-agent
|
||||||
|
|
||||||
- name: config ml2 plugin
|
- name: config ml2 plugin
|
||||||
template: src=ml2_conf.ini dest=/etc/neutron/plugins/ml2/ml2_conf.ini backup=yes
|
template: src=ml2_conf.ini
|
||||||
|
dest=/etc/neutron/plugins/ml2/ml2_conf.ini
|
||||||
|
backup=yes
|
||||||
notify:
|
notify:
|
||||||
- restart neutron-plugin-openvswitch-agent
|
- restart neutron-plugin-openvswitch-agent
|
||||||
|
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: activate ipv4 forwarding
|
- name: activate ipv4 forwarding
|
||||||
sysctl: name=net.ipv4.ip_forward value=1 state=present reload=yes
|
sysctl: name=net.ipv4.ip_forward value=1
|
||||||
|
state=present reload=yes
|
||||||
|
|
||||||
- name: deactivate ipv4 rp filter
|
- name: deactivate ipv4 rp filter
|
||||||
sysctl: name=net.ipv4.conf.all.rp_filter value=0 state=present reload=yes
|
sysctl: name=net.ipv4.conf.all.rp_filter value=0
|
||||||
|
state=present reload=yes
|
||||||
|
|
||||||
- name: deactivate ipv4 default rp filter
|
- name: deactivate ipv4 default rp filter
|
||||||
sysctl: name=net.ipv4.conf.default.rp_filter value=0 state=present reload=yes
|
sysctl: name=net.ipv4.conf.default.rp_filter
|
||||||
|
value=0 state=present reload=yes
|
||||||
|
|
||||||
- name: install neutron network related packages
|
- name: install neutron network related packages
|
||||||
apt: name={{ item }} state=present force=yes
|
apt: name={{ item }} state=present force=yes
|
||||||
@ -18,11 +21,13 @@
|
|||||||
- neutron-dhcp-agent
|
- neutron-dhcp-agent
|
||||||
|
|
||||||
- name: install neutron openvswitch agent
|
- name: install neutron openvswitch agent
|
||||||
apt: name=neutron-plugin-openvswitch-agent state=present force=yes
|
apt: name=neutron-plugin-openvswitch-agent
|
||||||
|
state=present force=yes
|
||||||
when: "'openvswitch' in {{ NEUTRON_MECHANISM_DRIVERS }}"
|
when: "'openvswitch' in {{ NEUTRON_MECHANISM_DRIVERS }}"
|
||||||
|
|
||||||
- name: config neutron
|
- name: config neutron
|
||||||
template: src=neutron-network.conf dest=/etc/neutron/neutron.conf backup=yes
|
template: src=neutron-network.conf
|
||||||
|
dest=/etc/neutron/neutron.conf backup=yes
|
||||||
notify:
|
notify:
|
||||||
- restart neutron-plugin-openvswitch-agent
|
- restart neutron-plugin-openvswitch-agent
|
||||||
- restart neutron-l3-agent
|
- restart neutron-l3-agent
|
||||||
@ -31,29 +36,35 @@
|
|||||||
- restart neutron-metadata-agent
|
- restart neutron-metadata-agent
|
||||||
|
|
||||||
- name: config l3 agent
|
- name: config l3 agent
|
||||||
template: src=l3_agent.ini dest=/etc/neutron/l3_agent.ini backup=yes
|
template: src=l3_agent.ini dest=/etc/neutron/l3_agent.ini
|
||||||
|
backup=yes
|
||||||
notify:
|
notify:
|
||||||
- restart neutron-l3-agent
|
- restart neutron-l3-agent
|
||||||
|
|
||||||
- name: config dhcp agent
|
- name: config dhcp agent
|
||||||
template: src=dhcp_agent.ini dest=/etc/neutron/dhcp_agent.ini backup=yes
|
template: src=dhcp_agent.ini dest=/etc/neutron/dhcp_agent.ini
|
||||||
|
backup=yes
|
||||||
notify:
|
notify:
|
||||||
- kill dnsmasq
|
- kill dnsmasq
|
||||||
- restart neutron-dhcp-agent
|
- restart neutron-dhcp-agent
|
||||||
|
|
||||||
- name: update dnsmasq-neutron.conf
|
- name: update dnsmasq-neutron.conf
|
||||||
template: src=dnsmasq-neutron.conf dest=/etc/neutron/dnsmasq-neutron.conf
|
template: src=dnsmasq-neutron.conf
|
||||||
|
dest=/etc/neutron/dnsmasq-neutron.conf
|
||||||
notify:
|
notify:
|
||||||
- kill dnsmasq
|
- kill dnsmasq
|
||||||
- restart neutron-dhcp-agent
|
- restart neutron-dhcp-agent
|
||||||
|
|
||||||
- name: config metadata agent
|
- name: config metadata agent
|
||||||
template: src=metadata_agent.ini dest=/etc/neutron/metadata_agent.ini backup=yes
|
template: src=metadata_agent.ini
|
||||||
|
dest=/etc/neutron/metadata_agent.ini backup=yes
|
||||||
notify:
|
notify:
|
||||||
- restart neutron-metadata-agent
|
- restart neutron-metadata-agent
|
||||||
|
|
||||||
- name: config ml2 plugin
|
- name: config ml2 plugin
|
||||||
template: src=ml2_conf.ini dest=/etc/neutron/plugins/ml2/ml2_conf.ini backup=yes
|
template: src=ml2_conf.ini
|
||||||
|
dest=/etc/neutron/plugins/ml2/ml2_conf.ini
|
||||||
|
backup=yes
|
||||||
notify:
|
notify:
|
||||||
- restart neutron-plugin-openvswitch-agent
|
- restart neutron-plugin-openvswitch-agent
|
||||||
|
|
||||||
@ -67,7 +78,8 @@
|
|||||||
when: "'openvswitch' in {{ NEUTRON_MECHANISM_DRIVERS }}"
|
when: "'openvswitch' in {{ NEUTRON_MECHANISM_DRIVERS }}"
|
||||||
|
|
||||||
- name: assign a port to br-ex for physical ext interface
|
- name: assign a port to br-ex for physical ext interface
|
||||||
openvswitch_port: bridge=br-ex port={{ INTERFACE_NAME }} state=present
|
openvswitch_port: bridge=br-ex port={{ INTERFACE_NAME }}
|
||||||
|
state=present
|
||||||
when: "'openvswitch' in {{ NEUTRON_MECHANISM_DRIVERS }}"
|
when: "'openvswitch' in {{ NEUTRON_MECHANISM_DRIVERS }}"
|
||||||
|
|
||||||
- include: igmp-router.yml
|
- include: igmp-router.yml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user