| --- |
| - hosts: haproxy2 |
| become: true |
| vars: |
| client_id: ameQ5tEp9iNLsPvwjCAKTejD561knLfW |
| client_secret: RXb4mGcWgXcLa6m7 |
| haproxy_socket: '/var/lib/haproxy/stats' |
| haproxy_chroot: '/var/lib/haproxy' |
| haproxy_user: 'haproxy' |
| haproxy_group: 'haproxy' |
| haproxy_frontend_name: 'all' |
| haproxy_frontend_bind_address: '*' |
| haproxy_frontend_port: 9001 |
| haproxy_frontend_mode: 'http' |
| haproxy_backend_name: 'app' |
| haproxy_backend_mode: 'http' |
| haproxy_backend_balance_method: 'roundrobin' |
| haproxy_backend_httpchk: '' |
| |
| roles: |
| - ansible-role-haproxy |
| |
| tasks: |
| - name: Use haproxy |
| ignore_errors: yes |
| connection: local |
| become: no |
| uri: |
| url: "http://34.207.183.115:9001/oauth/client_credential/accesstoken" |
| method: POST |
| headers: |
| Host: "api.tmobile.com" |
| Content-Type: "application/x-www-form-urlencoded" |
| body: grant_type=client_credentials&client_id={{ client_id }}&client_secret={{ client_secret }} |
| with_sequence: start=1 end=5000 |