Commit 3770b60d4c0b645af3dce8645b61a3702ea60875

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

changes

group_vars/proxyserver.yml
... ... @@ -0,0 +1,17 @@
  1 +---
  2 +proxyflag: true
  3 +var: true
  4 +proxyflag: true
  5 +depend_flag: true
  6 +
  7 +webserver1: 10.10.10.57
  8 +webserver2: 10.10.10.47
  9 +
  10 +proxy_port: 8002
  11 +webser_port: 8090
  12 +browser_port: 80
  13 +
  14 +proxy_dir: /opt/proxyserver/
  15 +path_to_python: /usr/bin/python2.7
  16 +
  17 +ansible_ssh_user=ubuntu ansible_python_interpreter={{path_to_python}}
... ...
hosts
... ... @@ -29,7 +29,7 @@
29 29 # Ex 3: A collection of database servers in the 'dbservers' group
30 30  
31 31 [dbservers]
32   -{{dbserver}}:22 ansible_ssh_user=ubuntu ansible_python_interpreter={{path_to_python}}
  32 +{{db_server}}:22 ansible_ssh_user=ubuntu ansible_python_interpreter={{path_to_python}}
33 33  
34 34 # Here's another example of host ranges, this time there are no
35 35 # leading 0s:
... ... @@ -37,7 +37,7 @@
37 37 #db-[99:101]-node.example.com
38 38  
39 39 [proxyserver]
40   -{{proxyserver}}:30023 ansible_ssh_user=ubuntu ansible_python_interpreter={{path_to_python}}
  40 +{{proxyserv}}:30023 ansible_ssh_user=ubuntu ansible_python_interpreter={{path_to_python}}
41 41  
42 42 [jenkinserver]
43 43 193.136.46.156:30022 ansible_ssh_user=ubuntu
... ...
playbook.yml
... ... @@ -4,8 +4,6 @@
4 4 roles:
5 5 - docker-git-pip
6 6 - proxyserver
7   - vars_files:
8   - - vars/vars.yaml
9 7  
10 8 - hosts: webservers
11 9 become: true
... ...
vars/vars.yaml
... ... @@ -20,7 +20,7 @@ app_port: 8000
20 20 browser_port: 80
21 21  
22 22 #máquinas que correm a app
23   -proxyserver: 10.10.10.33
  23 +proxyserv: 10.10.10.33
24 24 webserver1: 10.10.10.57
25 25 webserver2: 10.10.10.47
26 26 db_server: 10.10.10.74
... ...