kolla-ansible/tests/ansible_generate_inventory.yml
Michal (inc0) Jastrzebski f5354f55b1 Enable multinode gate
This patches changes deploy_gate quite a bit so in reality all
deployments will now assume multinode (even if it's single node). After
that we will refactor it even further to enable easy addition of new
scenerios.

Change-Id: I1faada46e6a7aa026128b2f01d77eabb04759439
2017-06-05 11:35:20 -07:00

27 lines
787 B
YAML

---
- hosts: localhost
connection: local
tasks:
- name: Get node addresses
set_fact:
primary_node_address: "{{ lookup('file', '/etc/nodepool/primary_node_private') }}"
sub_node_addresses: "{{ lookup('file', '/etc/nodepool/sub_nodes_private').split('\n') }}"
- set_fact: node_group="{{ lookup('template', 'templates/inventory.j2')}}"
- name: Ensure /tmp/kolla exists
file:
path: "/tmp/kolla"
state: "directory"
- name: Copy default ansible kolla-ansible inventory
copy:
src: ../ansible/inventory/all-in-one
dest: /tmp/kolla/raw_inventory
- name: Replace localhost with IPs
replace:
path: /tmp/kolla/raw_inventory
regexp: "localhost.*$"
replace: "{{ node_group }}"