move drive layout to deploy-vms and fix deploy-osa tags/tasks
Change-Id: Iaee4c3683d798320099dec77286e6fac7a10bee8 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
ca24b28fdc
commit
c3800224b0
@ -65,6 +65,7 @@
|
|||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
with_items: "{{ mnaio_dhcp_distro_packages }}"
|
with_items: "{{ mnaio_dhcp_distro_packages }}"
|
||||||
|
|
||||||
vars_files:
|
vars_files:
|
||||||
- vars/main.yml
|
- vars/main.yml
|
||||||
tags:
|
tags:
|
||||||
|
@ -13,49 +13,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Wait for deploy host
|
|
||||||
hosts: openstack_hosts
|
|
||||||
gather_facts: false
|
|
||||||
pre_tasks:
|
|
||||||
- name: Wait for container connectivity
|
|
||||||
wait_for_connection:
|
|
||||||
connect_timeout: 5
|
|
||||||
sleep: 10
|
|
||||||
timeout: 1200
|
|
||||||
tasks:
|
|
||||||
- name: copy host keys
|
|
||||||
copy:
|
|
||||||
src: "{{ item.src }}"
|
|
||||||
dest: "{{ item.dest }}"
|
|
||||||
mode: "0600"
|
|
||||||
with_items:
|
|
||||||
- src: /root/.ssh/id_rsa
|
|
||||||
dest: /root/.ssh/id_rsa
|
|
||||||
- src: /root/.ssh/id_rsa.pub
|
|
||||||
dest: /root/.ssh/id_rsa.pub
|
|
||||||
|
|
||||||
- name: un-mount deleteme mount
|
|
||||||
mount:
|
|
||||||
name: "/deleteme"
|
|
||||||
state: unmounted
|
|
||||||
|
|
||||||
- name: remote deleteme mount
|
|
||||||
mount:
|
|
||||||
name: "/deleteme"
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Remove deleteme dir
|
|
||||||
file:
|
|
||||||
path: "/deleteme"
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Remove deleteme lv
|
|
||||||
lvol:
|
|
||||||
vg: vg00
|
|
||||||
lv: deleteme00
|
|
||||||
force: true
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Setup cinder host volume
|
- name: Setup cinder host volume
|
||||||
hosts: cinder_hosts
|
hosts: cinder_hosts
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
@ -72,6 +29,11 @@
|
|||||||
vg: cinder-volumes
|
vg: cinder-volumes
|
||||||
pvs: "/dev/vg00/cinder-volumes00"
|
pvs: "/dev/vg00/cinder-volumes00"
|
||||||
|
|
||||||
|
vars_files:
|
||||||
|
- vars/main.yml
|
||||||
|
tags:
|
||||||
|
- deploy-osa
|
||||||
|
|
||||||
|
|
||||||
- name: Setup cinder host volume
|
- name: Setup cinder host volume
|
||||||
hosts: swift_hosts
|
hosts: swift_hosts
|
||||||
@ -119,6 +81,12 @@
|
|||||||
- disk2
|
- disk2
|
||||||
- disk3
|
- disk3
|
||||||
|
|
||||||
|
vars_files:
|
||||||
|
- vars/main.yml
|
||||||
|
tags:
|
||||||
|
- deploy-osa
|
||||||
|
|
||||||
|
|
||||||
- name: Setup deploy host
|
- name: Setup deploy host
|
||||||
hosts: deploy_hosts
|
hosts: deploy_hosts
|
||||||
gather_facts: "{{ gather_facts | default(true) }}"
|
gather_facts: "{{ gather_facts | default(true) }}"
|
||||||
@ -144,13 +112,6 @@
|
|||||||
when:
|
when:
|
||||||
- pre_config_osa | default(true) | bool
|
- pre_config_osa | default(true) | bool
|
||||||
|
|
||||||
- name: Create Basic configs
|
|
||||||
shell: cp -R etc/openstack_deploy/* /etc/openstack_deploy
|
|
||||||
args:
|
|
||||||
chdir: /opt/openstack-ansible
|
|
||||||
when:
|
|
||||||
- pre_config_osa | default(true) | bool
|
|
||||||
|
|
||||||
- name: Create base directories
|
- name: Create base directories
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
@ -165,6 +126,13 @@
|
|||||||
when:
|
when:
|
||||||
- pre_config_osa | default(true) | bool
|
- pre_config_osa | default(true) | bool
|
||||||
|
|
||||||
|
- name: Create Basic configs
|
||||||
|
shell: cp -R etc/openstack_deploy/* /etc/openstack_deploy
|
||||||
|
args:
|
||||||
|
chdir: /opt/openstack-ansible
|
||||||
|
when:
|
||||||
|
- pre_config_osa | default(true) | bool
|
||||||
|
|
||||||
- name: Drop osa config
|
- name: Drop osa config
|
||||||
template:
|
template:
|
||||||
src: "osa/openstack_user_config.yml"
|
src: "osa/openstack_user_config.yml"
|
||||||
@ -193,7 +161,9 @@
|
|||||||
- pre_config_osa | default(true) | bool
|
- pre_config_osa | default(true) | bool
|
||||||
|
|
||||||
- name: Get pip2 and pw gen deps
|
- name: Get pip2 and pw gen deps
|
||||||
command: python2 /opt/get-pip.py pycrypto pyyaml
|
shell: |
|
||||||
|
python2 /opt/get-pip.py
|
||||||
|
$(which pip2 || which pip) install setuptools pycrypto pyyaml
|
||||||
args:
|
args:
|
||||||
chdir: /opt/openstack-ansible
|
chdir: /opt/openstack-ansible
|
||||||
when:
|
when:
|
||||||
@ -226,3 +196,8 @@
|
|||||||
to the {{ groups['deploy_hosts'][0] }} VM and attach to the "build-osa" tmux session.
|
to the {{ groups['deploy_hosts'][0] }} VM and attach to the "build-osa" tmux session.
|
||||||
when:
|
when:
|
||||||
- run_osa | default(true) | bool
|
- run_osa | default(true) | bool
|
||||||
|
|
||||||
|
vars_files:
|
||||||
|
- vars/main.yml
|
||||||
|
tags:
|
||||||
|
- deploy-osa
|
||||||
|
@ -63,4 +63,69 @@
|
|||||||
vars_files:
|
vars_files:
|
||||||
- vars/main.yml
|
- vars/main.yml
|
||||||
tags:
|
tags:
|
||||||
- setup-host
|
- deploy-vms
|
||||||
|
|
||||||
|
|
||||||
|
- name: Create vm_servers group
|
||||||
|
hosts: localhost
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- name: Servers group
|
||||||
|
add_host:
|
||||||
|
name: "{{ item.server_vm_fixed_addr }}"
|
||||||
|
groups: vm_servers
|
||||||
|
with_items: "{{ servers }}"
|
||||||
|
|
||||||
|
vars_files:
|
||||||
|
- vars/main.yml
|
||||||
|
tags:
|
||||||
|
- deploy-vms
|
||||||
|
|
||||||
|
|
||||||
|
- name: Wait for deploy host
|
||||||
|
hosts: vm_servers
|
||||||
|
gather_facts: false
|
||||||
|
pre_tasks:
|
||||||
|
- name: Wait for container connectivity
|
||||||
|
wait_for_connection:
|
||||||
|
connect_timeout: 5
|
||||||
|
sleep: 10
|
||||||
|
timeout: 1200
|
||||||
|
tasks:
|
||||||
|
- name: copy host keys
|
||||||
|
copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
mode: "0600"
|
||||||
|
with_items:
|
||||||
|
- src: /root/.ssh/id_rsa
|
||||||
|
dest: /root/.ssh/id_rsa
|
||||||
|
- src: /root/.ssh/id_rsa.pub
|
||||||
|
dest: /root/.ssh/id_rsa.pub
|
||||||
|
|
||||||
|
- name: un-mount deleteme mount
|
||||||
|
mount:
|
||||||
|
name: "/deleteme"
|
||||||
|
state: unmounted
|
||||||
|
|
||||||
|
- name: remote deleteme mount
|
||||||
|
mount:
|
||||||
|
name: "/deleteme"
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Remove deleteme dir
|
||||||
|
file:
|
||||||
|
path: "/deleteme"
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Remove deleteme lv
|
||||||
|
lvol:
|
||||||
|
vg: vg00
|
||||||
|
lv: deleteme00
|
||||||
|
force: true
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
vars_files:
|
||||||
|
- vars/main.yml
|
||||||
|
tags:
|
||||||
|
- deploy-vms
|
@ -1,10 +1,13 @@
|
|||||||
# Physical interface, could be bond. This only needs to be set once
|
# Physical interface, could be bond. This only needs to be set once
|
||||||
{% for key, value in mnaio_host_networks.items() %}
|
{% for key, value in mnaio_host_networks.items() %}
|
||||||
{% if value.iface_port != 'none' %}
|
{% if value.iface_port != 'none' %}
|
||||||
auto {{ value.iface_port }}
|
auto {{ value.iface_port }}
|
||||||
iface {{ value.iface_port }} inet manual
|
iface {{ value.iface_port }} inet manual
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for key, value in mnaio_host_networks.items() %}
|
||||||
auto {{ value.iface }}
|
auto {{ value.iface }}
|
||||||
iface {{ value.iface }} inet {{ value.inet_type }}
|
iface {{ value.iface }} inet {{ value.inet_type }}
|
||||||
bridge_stp off
|
bridge_stp off
|
||||||
|
@ -1,18 +1,23 @@
|
|||||||
# Physical interface, could be bond. This only needs to be set once
|
# Physical interface, could be bond. This only needs to be set once
|
||||||
|
|
||||||
{% for key, value in item.server_networks.items()|sort(attribute='1.iface') %}
|
{% for key, value in item.server_networks.items()|sort(attribute='1.iface') %}
|
||||||
|
{% if value.iface is defined %}
|
||||||
auto {{ value.iface }}
|
auto {{ value.iface }}
|
||||||
iface {{ value.iface }} inet manual
|
iface {{ value.iface }} inet manual
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for key, value in item.server_networks.items()|sort(attribute='1.iface') %}
|
||||||
auto br-{{ key }}
|
auto br-{{ key }}
|
||||||
iface br-{{ key }} inet {{ value.inet_type }}
|
iface br-{{ key }} inet {{ value.inet_type }}
|
||||||
bridge_stp off
|
bridge_stp off
|
||||||
bridge_waitport 10
|
bridge_waitport 10
|
||||||
bridge_fd 0
|
bridge_fd 0
|
||||||
bridge_ports {{ value.iface }}
|
bridge_ports {{ value.iface | default('none') }}
|
||||||
offload-sg off
|
offload-sg off
|
||||||
{% if value.address is defined %}
|
{% if value.address is defined %}
|
||||||
address {{ value.address }}
|
address {{ value.address }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user