Commit 51d07875ee5c7d51533e2673c459abe22b890637

Authored by Ricardo Gonçalves
1 parent 6eabefc908
Exists in master

second changes

playbook.yml
1 1 ---
2   -- hosts: jenkinserver
  2 +- hosts: proxyserver
3 3 become: true
4 4 roles:
5 5 - docker
... ...
roles/proxyserver/tasks/main.yml
... ... @@ -36,14 +36,14 @@
36 36 when:
37 37 - var
38 38  
39   -# - name: Running containers with docker-compose
40   -# docker_service:
41   -# project_src: "{{proxy_dir}}"
42   -# build: yes
43   -# nocache: yes
44   -# state: "{{'present' if var else 'absent'}}"
45   - # when:
46   - # - var
  39 +- name: Running containers with docker-compose
  40 + docker_service:
  41 + project_src: "{{proxy_dir}}"
  42 + build: yes
  43 + nocache: yes
  44 + state: "{{'present' if var else 'absent'}}"
  45 + when:
  46 + - var
47 47  
48 48 # - name: "Running containers"
49 49 # docker_service:
... ...
roles/proxyserver/templates/docker-compose.yml
... ... @@ -6,8 +6,8 @@ services:
6 6 container_name: myproxy
7 7 ports:
8 8 - "{{browser_port}}:{{proxy_port}}"
9   - depends_on:
10   - - nginx
  9 + # depends_on:
  10 + # - nginx
11 11  
12 12 # jenkins:
13 13 # image: jenkins
... ...
roles/proxyserver/templates/haproxy.cfg
... ... @@ -48,5 +48,5 @@ frontend webserver
48 48  
49 49 backend apptest
50 50 balance roundrobin
51   - server {{webserver1}} {{webserver1}}:{{webser_port}} checks
52   - server {{webserver2}} {{webserver2}}:{{webser_port}} checks
53 51 \ No newline at end of file
  52 + server {{webserver1}} {{webserver1}}:{{webser_port}} check
  53 + server {{webserver2}} {{webserver2}}:{{webser_port}} check
54 54 \ No newline at end of file
... ...
vars/vars.yaml
... ... @@ -14,7 +14,7 @@ db_dir: /opt/dbserver/
14 14 proxy_port: 8002
15 15 webser_port: 8090
16 16 app_port: 8000
17   -browser_port: 80
  17 +browser_port: 30098
18 18  
19 19 #máquinas que correm a app
20 20 webserver1: 10.10.10.57
... ...