install-script.yml 5.57 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
- name: a play that runs entirely on the ansible host
  hosts: 127.0.0.1
  connection: local

  vars:
   - base_path: .

  pre_tasks:
    - name: Create script structure
      command: mkdir -p {{ base_path }}/{{ item }} 
      with_items:
        - install/gnet/
13
        - install/unstable/gnet/
14
        - install/testing/gnet/
15
        - install/imt/
16
        - install/unstable/imt/
17 18 19 20 21 22 23 24 25 26 27

    - name: generate scripts
      template: src=roles/install-script/templates/base_setup.j2 dest={{ base_path }}/install/base-setup mode=0666

    - name: Register base-setup md5
      stat: path={{ base_path }}/install/base-setup
      register: base_setup

    - name: generate scripts
      template: src=roles/install-script/templates/dev.j2 dest={{ base_path }}/install/devbook mode=0666

28 29 30
    - name: generate ansible-only
      template: src=roles/install-script/templates/ansible-only.j2 dest={{ base_path }}/install/ansible mode=0666

31 32
    - name: generate main index.html
      copy: src=roles/install-script/files/main_index.html dest={{ base_path }}/install/index.html mode=0666
33 34

    - name: generate index.html
35 36 37 38 39 40 41 42
      copy: src=roles/install-script/files/index.html dest={{ base_path }}/{{ item }}/index.html mode=0666
      with_items:
        - install/gnet
        - install/imt
        - install/unstable
        - install/unstable/imt
        - install/testing/gnet
        - install/testing
43

44 45 46 47
  post_tasks:
    - shell: tree | grep -v index.html | grep -v \ directories > map.txt
      args:
        chdir: install/
48

49
  roles:
50 51 52 53 54 55 56 57 58 59 60
    - { role: "install-script", channel: "slapos", playbook_yml: "slapos.yml", script_path: "install/slapos" }
    - { role: "install-script", channel: "slapos", playbook_yml: "re6stnet.yml", script_path: "install/re6st"}
    - { role: "install-script", channel: "slapos", playbook_yml: "vifib.yml", script_path: "install/vifib"}
    - { role: "install-script", channel: "slapos", playbook_yml: "vifib-shuttle.yml", script_path: "install/vifib-shuttle"}
    - { role: "install-script", channel: "slapos", playbook_yml: "erp5-standalone.yml", script_path: "install/erp5-standalone"}
    - { role: "install-script", channel: "slapos", playbook_yml: "wendelin-standalone.yml", script_path: "install/wendelin-standalone"}
    - { role: "install-script", channel: "slapos", playbook_yml: "slapos-test-node.yml", script_path: "install/slapos-test-node"}
    - { role: "install-script", channel: "slapos", playbook_yml: "gnet-re6stnet.yml", script_path: "install/gnet/re6st"}
    - { role: "install-script", channel: "slapos", playbook_yml: "gnet-server.yml", script_path: "install/gnet/slapos"}
    - { role: "install-script", channel: "slapos", playbook_yml: "test-suite.yml", script_path: "install/test-suite"}

61 62 63 64 65 66
    - { role: "install-script", channel: "stable", playbook_yml: "imt-server-update.yml", script_path: "install/imt/slapos-update"}
    - { role: "install-script", channel: "stable", playbook_yml: "imt-server.yml", script_path: "install/imt/slapos"}
    - { role: "install-script", channel: "stable", playbook_yml: "imt-vm-bootstrap.yml", script_path: "install/imt/vm-bootstrap"}
    - { role: "install-script", channel: "stable", playbook_yml: "imt-vm-cloudera-manager.yml", script_path: "install/imt/vm-cloudera-manager"}
    - { role: "install-script", channel: "stable", playbook_yml: "imt-re6stnet.yml", script_path: "install/imt/re6st"}

67 68 69 70 71 72 73 74 75 76
    - { role: "install-script", channel: "slapos_testing", playbook_yml: "slapos.yml", script_path: "install/testing/slapos" }
    - { role: "install-script", channel: "slapos_testing", playbook_yml: "re6stnet.yml", script_path: "install/testing/re6st"}
    - { role: "install-script", channel: "slapos_testing", playbook_yml: "vifib.yml", script_path: "install/testing/vifib"}
    - { role: "install-script", channel: "slapos_testing", playbook_yml: "vifib-shuttle.yml", script_path: "install/testing/vifib-shuttle"}
    - { role: "install-script", channel: "slapos_testing", playbook_yml: "erp5-standalone.yml", script_path: "install/testing/erp5-standalone"}
    - { role: "install-script", channel: "slapos_testing", playbook_yml: "wendelin-standalone.yml", script_path: "install/testing/wendelin-standalone"}
    - { role: "install-script", channel: "slapos_testing", playbook_yml: "slapos-test-node.yml", script_path: "install/testing/slapos-test-node"}
    - { role: "install-script", channel: "slapos_testing", playbook_yml: "gnet-re6stnet.yml", script_path: "install/testing/gnet/re6st"}
    - { role: "install-script", channel: "slapos_testing", playbook_yml: "gnet-server.yml", script_path: "install/testing/gnet/slapos"}
    - { role: "install-script", channel: "slapos_testing", playbook_yml: "test-suite.yml", script_path: "install/testing/test-suite"}
77 78 79 80 81 82 83 84

    - { role: "install-script", channel: "unstable", playbook_yml: "imt-server-update.yml", script_path: "install/unstable/imt/slapos-update"}
    - { role: "install-script", channel: "unstable", playbook_yml: "imt-server.yml", script_path: "install/unstable/imt/slapos"}
    - { role: "install-script", channel: "unstable", playbook_yml: "imt-vm-bootstrap.yml", script_path: "install/unstable/imt/vm-bootstrap"}
    - { role: "install-script", channel: "unstable", playbook_yml: "imt-vm-bootstrap.yml", script_path: "install/imt-dev-bootstrap"}
    - { role: "install-script", channel: "unstable", playbook_yml: "imt-vm-cloudera-manager.yml", script_path: "install/unstable/imt/vm-cloudera-manager"}
    - { role: "install-script", channel: "unstable", playbook_yml: "imt-re6stnet.yml", script_path: "install/unstable/imt/re6st"}
    - { role: "install-script", channel: "unstable", playbook_yml: "test-suite.yml", script_path: "install/unstable/test-suite"}