7 - name: generate SSH keys
8 shell: ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N ""
10 creates: /root/.ssh/id_rsa
11 - name: fetch public key
12 fetch: src="/root/.ssh/id_rsa.pub" dest="/"
13 - name: remove the directory
14 shell: "rm -rf {{OSA_PATH}} {{OSA_ETC_PATH}}"
15 - name: git openstack ansible
16 shell: "git clone {{OSA_URL}} {{OSA_PATH}} -b {{OPENSTACK_BRANCH}}"
17 - name: copy opnfv-setup-openstack.yml to /opt/openstack-ansible/playbooks
19 src: ../file/opnfv-setup-openstack.yml
20 dest: "{{OSA_PATH}}/playbooks/opnfv-setup-openstack.yml"
21 - name: copy /opt/openstack-ansible/etc/openstack_deploy to /etc/openstack_deploy
22 shell: "/bin/cp -rf {{OSA_PATH}}/etc/openstack_deploy {{OSA_ETC_PATH}}"
24 command: "/bin/bash ./scripts/bootstrap-ansible.sh"
27 - name: generate password token
28 command: "python pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml"
30 chdir: /opt/openstack-ansible/scripts/
31 - name: copy openstack_user_config.yml to /etc/openstack_deploy
33 src: ../file/openstack_user_config.yml
34 dest: "{{OSA_ETC_PATH}}/openstack_user_config.yml"
35 - name: copy cinder.yml to /etc/openstack_deploy/env.d
37 src: ../file/cinder.yml
38 dest: "{{OSA_ETC_PATH}}/env.d/cinder.yml"
39 - name: copy user_variables.yml to /etc/openstack_deploy/
41 src: ../file/user_variables.yml
42 dest: "{{OSA_ETC_PATH}}/user_variables.yml"
43 - name: configure network
45 src: ../template/bifrost/controller.interface.j2
46 dest: /etc/network/interfaces
48 - restart network service
50 - name: restart network service
51 shell: "/sbin/ifconfig ens3 0 &&/sbin/ifdown -a && /sbin/ifup -a"
56 - name: Generate authorized_keys
57 shell: "/bin/cat /xcimaster/root/.ssh/id_rsa.pub >> ../file/authorized_keys"