aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deployment/noheat/README.rst5
-rw-r--r--deployment/noheat/infra-openstack/README.rst5
-rw-r--r--deployment/noheat/infra-openstack/ansible/create.yml10
-rw-r--r--deployment/noheat/infra-openstack/ansible/group_vars/all.yml.sample1
-rw-r--r--deployment/noheat/infra-openstack/ansible/group_vars/all.yml.sm-onap1
-rw-r--r--deployment/noheat/infra-openstack/ansible/templates/inventory.ini.j28
6 files changed, 29 insertions, 1 deletions
diff --git a/deployment/noheat/README.rst b/deployment/noheat/README.rst
index 287dc9f9a..f3c7fb8e4 100644
--- a/deployment/noheat/README.rst
+++ b/deployment/noheat/README.rst
@@ -25,6 +25,11 @@ Dependencies
~~~~~~~~~~~~
- Ansible: tested on 2.9.9 (using Python 3.5.2)
+ - Collections
+ - community.crypto: tested on 1.3.0
+ - ansible.posix: tested on 1.1.1
+ - Roles
+ - geerlingguy.ansible: tested on 2.1.0
- openstacksdk_: tested on 0.46.0 (using Python 3.5.2)
.. _openstacksdk: https://pypi.org/project/openstacksdk
diff --git a/deployment/noheat/infra-openstack/README.rst b/deployment/noheat/infra-openstack/README.rst
index cb7cb9320..1ac9539f5 100644
--- a/deployment/noheat/infra-openstack/README.rst
+++ b/deployment/noheat/infra-openstack/README.rst
@@ -23,6 +23,11 @@ Dependencies
~~~~~~~~~~~~
- Ansible: tested on 2.9.9 (using Python 3.5.2)
+ - Collections
+ - community.crypto: tested on 1.3.0
+ - ansible.posix: tested on 1.1.1
+ - Roles
+ - geerlingguy.ansible: tested on 2.1.0
- openstacksdk_: tested on 0.46.0 (using Python 3.5.2)
.. _openstacksdk: https://pypi.org/project/openstacksdk
diff --git a/deployment/noheat/infra-openstack/ansible/create.yml b/deployment/noheat/infra-openstack/ansible/create.yml
index 69ecd1dd9..a088662b2 100644
--- a/deployment/noheat/infra-openstack/ansible/create.yml
+++ b/deployment/noheat/infra-openstack/ansible/create.yml
@@ -30,7 +30,9 @@
operator_key: "{{ hostvars['operator0']['key']['public_key'] }}"
- name: Create cluster operator access information
hosts: "operator0"
- gather_facts: False
+ roles:
+ - role: geerlingguy.ansible
+ become: yes
tasks:
- name: Add cluster hostnames to /etc/hosts file
lineinfile:
@@ -38,3 +40,9 @@
line: "{{ item.value + ' ' + item.key }}"
become: yes
loop: "{{ lookup('dict', hostvars['localhost']['hosts_dict']) }}"
+ - name: Create inventory for in-cluster deployment stage
+ template:
+ src: templates/inventory.ini.j2
+ dest: "{{ operation.inventory }}"
+ vars:
+ hosts: "{{ lookup('dict', hostvars['localhost']['hosts_dict']) }}"
diff --git a/deployment/noheat/infra-openstack/ansible/group_vars/all.yml.sample b/deployment/noheat/infra-openstack/ansible/group_vars/all.yml.sample
index 72d37a303..470c2b120 100644
--- a/deployment/noheat/infra-openstack/ansible/group_vars/all.yml.sample
+++ b/deployment/noheat/infra-openstack/ansible/group_vars/all.yml.sample
@@ -18,6 +18,7 @@ image:
operation:
name: "operation0"
+ inventory: "~/inventory.ini"
hosts:
- name: "operator0"
image: *image_name
diff --git a/deployment/noheat/infra-openstack/ansible/group_vars/all.yml.sm-onap b/deployment/noheat/infra-openstack/ansible/group_vars/all.yml.sm-onap
index 744f91839..fb4f20861 100644
--- a/deployment/noheat/infra-openstack/ansible/group_vars/all.yml.sm-onap
+++ b/deployment/noheat/infra-openstack/ansible/group_vars/all.yml.sm-onap
@@ -17,6 +17,7 @@ image:
operation:
name: "operation0"
+ inventory: "~/inventory.ini"
hosts:
- name: "operator0"
image: *image_name
diff --git a/deployment/noheat/infra-openstack/ansible/templates/inventory.ini.j2 b/deployment/noheat/infra-openstack/ansible/templates/inventory.ini.j2
new file mode 100644
index 000000000..421c9c21f
--- /dev/null
+++ b/deployment/noheat/infra-openstack/ansible/templates/inventory.ini.j2
@@ -0,0 +1,8 @@
+[all]
+{% for item in hosts %}
+{{ item.key }} ansible_host={{ item.value }}
+{% endfor %}
+
+[all:vars]
+ansible_ssh_private_key_file="~/.ssh/{{ keypair.name }}"
+ansible_ssh_common_args='-o StrictHostKeyChecking=no'