Created
October 8, 2020 06:48
-
-
Save cankush625/314d77587593d8957a5a1cfa80848e7a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # tasks file for haproxy | |
| - name: install haproxy | |
| package: | |
| name: haproxy | |
| state: present | |
| register: haproxystate | |
| - name: haproxy config | |
| template: | |
| dest: "/etc/haproxy/haproxy.cfg" | |
| src: "templates/haproxy.cfg.j2" | |
| when: haproxystate.rc == 0 | |
| notify: restart haproxy service | |
| - name: start haproxy service | |
| service: | |
| name: haproxy | |
| state: started |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment