diff options
author | wutianwei <wutianwei1@huawei.com> | 2017-02-07 16:35:27 +0800 |
---|---|---|
committer | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2017-08-11 12:56:12 -0700 |
commit | 2d16c440ef7ef0aa8e807df33fa25783952b93d1 (patch) | |
tree | 1a86135e841d56d664246ea0d5a7bac5902c555c /openstack-ansible/playbooks/targethost_configuration.yml | |
parent | f37b1727593632eae93a6347ccf628325e430d01 (diff) |
Add scripts and playbook to deploy OSA
The script and playbooks defined on this repo will deploy an OpenStack cloud
based on OpenStack-Ansible.
You just need to run the osa_deploy.sh.
More information please refer to the README.md
Change-Id: I731c366ab7197aefd7726150477ba1cc4d2932d3
Signed-off-by: wutianwei <wutianwei1@huawei.com>
Diffstat (limited to 'openstack-ansible/playbooks/targethost_configuration.yml')
-rw-r--r-- | openstack-ansible/playbooks/targethost_configuration.yml | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/openstack-ansible/playbooks/targethost_configuration.yml b/openstack-ansible/playbooks/targethost_configuration.yml new file mode 100644 index 00000000..ffe788f0 --- /dev/null +++ b/openstack-ansible/playbooks/targethost_configuration.yml @@ -0,0 +1,61 @@ +--- +- hosts: all + remote_user: root + vars_files: + - ../var/ubuntu.yml + tasks: + - name: add public key to host + copy: + src: ../file/authorized_keys + dest: /root/.ssh/authorized_keys + - name: configure modules + copy: + src: ../file/modules + dest: /etc/modules + +- hosts: controller + remote_user: root + vars_files: + - ../var/ubuntu.yml + tasks: + - name: configure network + template: + src: ../template/bifrost/controller.interface.j2 + dest: /etc/network/interfaces + notify: + - restart network service + handlers: + - name: restart network service + shell: "/sbin/ifconfig ens3 0 &&/sbin/ifdown -a && /sbin/ifup -a" + +- hosts: compute + remote_user: root + vars_files: + - ../var/ubuntu.yml + tasks: + - name: configure network + template: + src: ../template/bifrost/compute.interface.j2 + dest: /etc/network/interfaces + notify: + - restart network service + handlers: + - name: restart network service + shell: "/sbin/ifconfig ens3 0 &&/sbin/ifdown -a && /sbin/ifup -a" + +- hosts: compute01 + remote_user: root + tasks: + - name: make nfs dir + file: "dest=/images mode=777 state=directory" + - name: configure sdrvice + shell: "echo 'nfs 2049/tcp' >> /etc/services && echo 'nfs 2049/udp' >> /etc/services" + - name: configure NFS + copy: + src: ../file/exports + dest: /etc/exports + notify: + - restart nfs service + handlers: + - name: restart nfs service + service: name=nfs-kernel-server state=restarted |