Commit 86e04c92db7b4a60f03cadb77c9e2c6f2da0e996

Authored by Ricardo Gon├žalves
1 parent fd640fcb72
Exists in master

changes

group_vars/proxyserver.yaml
... ... @@ -6,7 +6,6 @@ var: true
6 6 webserver1: 10.10.10.57
7 7 webserver2: 10.10.10.47
8 8  
9   -proxy_port: 8002
10 9 webser_port: 8090
11 10 browser_port: 80
12 11  
... ...
hosts
... ... @@ -18,8 +18,8 @@
18 18 # Ex 2: A collection of hosts belonging to the 'webservers' group
19 19  
20 20 [webservers]
21   -{{webserver1}}:22
22   -{{webserver2}}:22
  21 +10.10.10.57:22
  22 +10.10.10.47:22
23 23  
24 24 # If you have multiple hosts following a pattern you can specify
25 25 # them like this:
... ... @@ -29,7 +29,7 @@
29 29 # Ex 3: A collection of database servers in the 'dbservers' group
30 30  
31 31 [dbservers]
32   -{{db_server}}:22
  32 +10.10.10.74:22
33 33  
34 34 # Here's another example of host ranges, this time there are no
35 35 # leading 0s:
... ... @@ -37,10 +37,10 @@
37 37 #db-[99:101]-node.example.com
38 38  
39 39 [proxyserver]
40   -{{proxyserv}}:30023
  40 +10.10.10.33:30023
41 41  
42 42 [jenkinserver]
43 43 193.136.46.156:30022 ansible_ssh_user=ubuntu
44 44  
45 45 [local]
46   -localhost ansible_connection=local
47 46 \ No newline at end of file
  47 +localhost ansible_connection=local
... ...
roles/dbserver/tasks/main.yml
... ... @@ -19,6 +19,4 @@
19 19 project_src: "{{db_dir}}"
20 20 build: yes
21 21 nocache: yes
22   - state: "{{'present' if var else 'absent'}}"
23   - when:
24   - - dbflag
25 22 \ No newline at end of file
  23 + state: "{{'present' if var else 'absent'}}"
26 24 \ No newline at end of file
... ...
roles/proxyserver/tasks/main.yml
... ... @@ -27,8 +27,6 @@
27 27 build: yes
28 28 nocache: yes
29 29 state: "{{'present' if var else 'absent'}}"
30   - when:
31   - - proxyflag
32 30  
33 31 # - name: "Running containers"
34 32 # docker_service:
... ...
roles/proxyserver/templates/haproxy.cfg
... ... @@ -42,7 +42,7 @@ defaults
42 42  
43 43  
44 44 frontend webserver
45   - bind *:{{proxy_port}}
  45 + bind *:8002
46 46 mode http
47 47 default_backend apptest
48 48  
... ...
roles/webserver/tasks/main.yml
... ... @@ -33,6 +33,4 @@
33 33 project_src: "{{webs_dir}}"
34 34 build: yes
35 35 nocache: yes
36   - state: "{{'present' if var else 'absent'}}"
37   - when:
38   - - webflag
39 36 \ No newline at end of file
  37 + state: "{{'present' if var else 'absent'}}"
40 38 \ No newline at end of file
... ...
roles/webserver/templates/docker-compose.yml
... ... @@ -15,6 +15,6 @@ services:
15 15 context: ./nginx_cont/
16 16 container_name: myserver
17 17 ports:
18   - - "{{webser_port}}:{{webser_port}}"
  18 + - "{{webser_port}}:8090"
19 19 depends_on:
20 20 - app
21 21 \ No newline at end of file
... ...
roles/webserver/templates/nginx.conf
... ... @@ -6,7 +6,7 @@
6 6 }
7 7  
8 8 server {
9   - listen {{webser_port}};
  9 + listen 8090;
10 10 server_name _;
11 11 location / {
12 12 proxy_pass http://usersmanager;
... ...