summaryrefslogtreecommitdiffstats
path: root/util/docker-compose/roles/osa/tasks/main.yml
blob: 7b868908ceb4c27f31dbb13cc0d59795eb9300c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
- name: install packege
  shell: |
    docker exec compass-tasks bash -c \
    "yum upgrade -y; \
     yum install https://rdoproject.org/repos/openstack-ocata/rdo-release-ocata.rpm -y; \
     yum install git ntp ntpdate openssh-server python-devel sudo '@Development Tools' -y"

- name: git clone openstack-ansible
  shell: |
    docker exec compass-tasks bash -c \
    "rm -rf /opt/openstack-ansible; \
     git clone https://git.openstack.org/openstack/openstack-ansible /opt/openstack-ansible"

- name: change openstack-ansible to ocata branch
  shell: |
    docker exec compass-tasks bash -c \
    "cd /opt/openstack-ansible; \
     git checkout -b ocata remotes/origin/stable/ocata"

- name: copy /opt/openstack-ansible/etc/openstack_deploy to /etc/openstack_deploy
  shell: |
    docker exec compass-tasks bash -c \
    "rm -rf /etc/openstack_deploy; \
     /bin/cp -rf /opt/openstack-ansible/etc/openstack_deploy /etc/openstack_deploy"

- name: bootstrap
  shell: |
    docker exec compass-tasks bash -c \
    "cd /opt/openstack-ansible; \
     scripts/bootstrap-ansible.sh; \
     rm /usr/local/bin/ansible-playbook -f"

- name: generate password token
  shell: |
    docker exec compass-tasks bash -c \
    " cd /opt/openstack-ansible/scripts/; \
      python pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml"

- name: copy cinder file
  copy:
   src: cinder.yml
   dest: "{{ docker_compose_dir }}/cinder.yml"

- name: copy file to docker
  shell: |
    docker cp "{{ docker_compose_dir }}/cinder.yml" \
    compass-tasks:/etc/openstack_deploy/env.d/cinder.yml;