diff --git a/alb-ha-cluster-infra.yml b/alb-ha-cluster-infra.yml index 888fb82..3ae5a39 100644 --- a/alb-ha-cluster-infra.yml +++ b/alb-ha-cluster-infra.yml @@ -10,45 +10,6 @@ # (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-echo.etica.ai 6379 # (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-foxtrot.etica.ai 6379 -- name: "alb-ha-cluster-infra: Playbook to manange the cluster underline infrastructure (not the apps)" - # hosts: cluster_all_nodes - hosts: none - remote_user: root - vars: - # On this ap-alb-cluster-demo, we will use as example a single YAML file - # containing all variables at /hosts.yml - # - # Note that ansible allows other types of inventories - roles: - - ap-application-load-balancer - - -# We will use https://github.com/DavidWittman/ansible-redis to setup an Redis cluster - -- name: "alb-ha-cluster-infra + davidwittman.redis: setup master, slave and sentinel" - hosts: cluster_all_nodes - roles: - - davidwittman.redis - -#- name: configure the master redis server -# hosts: redis_leader -# roles: -# - davidwittman.redis - -#- name: configure redis slaves -# hosts: redis_follower -# vars: -# # - redis_slaveof: redis-master.example.com 6379 -# roles: -# - davidwittman.redis - -#- name: configure redis sentinel nodes -# hosts: redis_sentinel -# vars: -# #- redis_sentinel_monitors: -# # - name: master01 -# # host: redis-master.example.com -# # port: 6379 -# roles: -# - davidwittman.redis \ No newline at end of file +- import_playbook: playbooks/alb-ha-cluster-infra-alb.yml +- import_playbook: playbooks/alb-ha-cluster-infra-redis.yml diff --git a/playbooks/alb-ha-cluster-infra-alb.yml b/playbooks/alb-ha-cluster-infra-alb.yml new file mode 100644 index 0000000..c77f571 --- /dev/null +++ b/playbooks/alb-ha-cluster-infra-alb.yml @@ -0,0 +1,23 @@ +--- +# FILE: alb-ha-cluster-infra-alb.yml +# LICENSE: Public Domain + + +# ansible-playbook -i hosts.yml playbooks/alb-ha-cluster-infra-alb.yml + +# To do some basic check for see if redis is listening, is possible to use +# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-delta.etica.ai 6379 +# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-echo.etica.ai 6379 +# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-foxtrot.etica.ai 6379 + +- name: "alb-ha-cluster-infra: Playbook to manange the cluster underline infrastructure (not the apps)" + hosts: cluster_all_nodes + remote_user: root + vars: + # On this ap-alb-cluster-demo, we will use as example a single YAML file + # containing all variables at /hosts.yml + # + # Note that ansible allows other types of inventories + + roles: + - ap-application-load-balancer diff --git a/playbooks/alb-ha-cluster-infra-redis.yml b/playbooks/alb-ha-cluster-infra-redis.yml new file mode 100644 index 0000000..1d1e7bb --- /dev/null +++ b/playbooks/alb-ha-cluster-infra-redis.yml @@ -0,0 +1,18 @@ +--- +# FILE: alb-ha-cluster-infra.yml +# LICENSE: Public Domain + + +# ansible-playbook -i hosts.yml playbooks/alb-ha-cluster-infra-redis.yml + +# To do some basic check for see if redis is listening, is possible to use +# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-delta.etica.ai 6379 +# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-echo.etica.ai 6379 +# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-foxtrot.etica.ai 6379 + +# We will use https://github.com/DavidWittman/ansible-redis to setup an Redis cluster + +- name: "alb-ha-cluster-infra + davidwittman.redis: setup master, slave and sentinel" + hosts: cluster_all_nodes + roles: + - davidwittman.redis