Andy Bavier | 7b90cb8 | 2017-06-22 10:33:00 -0400 | [diff] [blame] | 1 | --- |
| 2 | # dev-env/tasks/main.yml |
| 3 | |
| 4 | - name: Create SSH keypair |
| 5 | user: |
| 6 | name: "{{ ansible_env.USER }}" |
| 7 | generate_ssh_key: yes |
| 8 | ssh_key_bits: 2048 |
| 9 | |
| 10 | - name: Create node_key |
| 11 | copy: |
| 12 | src: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub" |
| 13 | dest: "{{ ansible_env.HOME }}/node_key" |
| 14 | |
| 15 | - name: Install Apache |
| 16 | become: yes |
| 17 | apt: |
| 18 | name: "{{ item }}" |
| 19 | update_cache: yes |
| 20 | with_items: |
| 21 | - "apache2" |
Andy Bavier | 7fea345 | 2017-07-19 09:31:02 -0700 | [diff] [blame] | 22 | - "libapache2-mod-fcgid" |
Andy Bavier | 7b90cb8 | 2017-06-22 10:33:00 -0400 | [diff] [blame] | 23 | - "apache2-mpm-worker" |
| 24 | |
| 25 | - name: Configure Apache |
| 26 | become: yes |
| 27 | apache2_module: |
| 28 | name: "{{ item }}" |
| 29 | state: present |
| 30 | with_items: |
| 31 | - "proxy_http" |
| 32 | - "headers" |
| 33 | - "rewrite" |
| 34 | - "proxy_wstunnel" |
| 35 | |
| 36 | - name: Copy Apache conf |
| 37 | become: yes |
| 38 | copy: |
| 39 | src: "roles/apache-proxy/files/cord-http.conf" |
| 40 | dest: "/etc/apache2/conf-enabled/cord-http.conf" |
| 41 | |
| 42 | - name: Reload Apache |
| 43 | become: yes |
| 44 | service: |
| 45 | name: apache2 |
| 46 | state: reloaded |
| 47 | |
| 48 | - name: Add hosts |
| 49 | become: yes |
| 50 | lineinfile: |
| 51 | dest: /etc/hosts |
| 52 | line: "{{ item }}" |
| 53 | with_items: |
| 54 | - "127.0.0.1 xos" |
| 55 | - "127.0.0.1 xos-gui" |
| 56 | - "127.0.0.1 xos-ws" |
| 57 | - "127.0.0.1 xos-chameleon" |
| 58 | - "127.0.0.1 xos-core" |
Matteo Scandolo | c4f2c5f | 2017-07-12 16:25:08 -0700 | [diff] [blame] | 59 | - "127.0.0.1 xos-tosca" |
Andy Bavier | 7b90cb8 | 2017-06-22 10:33:00 -0400 | [diff] [blame] | 60 | - "127.0.0.1 consul" |