blob: f0e1982b13c6450a4f86c70483f6de3cb1421d6f [file] [log] [blame]
Andy Bavier7b90cb82017-06-22 10:33:00 -04001---
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"
22 - "libapache2-mod-fastcgi"
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 Scandoloc4f2c5f2017-07-12 16:25:08 -070059 - "127.0.0.1 xos-tosca"
Andy Bavier7b90cb82017-06-22 10:33:00 -040060 - "127.0.0.1 consul"