Skip to content

Instantly share code, notes, and snippets.

@cankush625
Created October 8, 2020 07:33
Show Gist options
  • Save cankush625/7303ab21a2baa3cde2f6a7b6fd557ac9 to your computer and use it in GitHub Desktop.
Save cankush625/7303ab21a2baa3cde2f6a7b6fd557ac9 to your computer and use it in GitHub Desktop.
- hosts: localhost
vars_files:
- secret.yml
roles:
- role: ec2_instance
count: 3
tag_name: "Auto_webserver"
accesskey: "{{ aws_access }}"
secretkey: "{{ aws_secret }}"
- role: ec2_instance
count: 1
tag_name: "Auto_loadbalancer"
accesskey: "{{ aws_access }}"
secretkey: "{{ aws_secret }}"
- hosts: tag_Name_Auto_webserver
roles:
- role: webserver
port: 8123
- hosts: tag_Name_Auto_loadbalancer
roles:
- role: haproxy
port: 8123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment