Ansible galaxy Role

48 views
Skip to first unread message

Mahdi Idriss

unread,
Jun 18, 2022, 8:03:57 AM6/18/22
to Ansible Project
Hello Mates, i have a question regarding ansible galaxy roles: i want to create a playbook that runs on hosts using balancer role, and this role create service to load balance web server requests between hosts in the webservers hosts, and if i browse the host (http://ansible1.example.com) it must produce (hello ansible user to ansible1.example.com on 192.168.137.200) and if i reload it the output should be (hello ansible user to ansible2.example.com on 192.168.137.201)

Abhijeet Kasurde

unread,
Jun 18, 2022, 10:04:43 AM6/18/22
to ansible...@googlegroups.com
What is the question?

On Sat, Jun 18, 2022 at 5:34 PM Mahdi Idriss <idriss.m...@gmail.com> wrote:
Hello Mates, i have a question regarding ansible galaxy roles: i want to create a playbook that runs on hosts using balancer role, and this role create service to load balance web server requests between hosts in the webservers hosts, and if i browse the host (http://ansible1.example.com) it must produce (hello ansible user to ansible1.example.com on 192.168.137.200) and if i reload it the output should be (hello ansible user to ansible2.example.com on 192.168.137.201)

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2fc725b1-bbdb-4829-adc0-bd5c5b6938a9n%40googlegroups.com.


--
Thanks,
Abhijeet Kasurde

Rock

unread,
Jun 18, 2022, 11:21:35 AM6/18/22
to Ansible Project
the question is mentioned above !! ( regarding ansible galaxy roles: i want to create a playbook that runs on hosts using balancer role, and this role create service to load balance web server requests between hosts in the webservers hosts, and if i browse the host (http://ansible1.example.com) it must produce (hello ansible user to ansible1.example.com on 192.168.137.200) and if i reload it the output should be (hello ansible user to ansible2.example.com on 192.168.137.201))

dulh...@mailbox.org

unread,
Jun 18, 2022, 11:36:44 AM6/18/22
to ansible...@googlegroups.com

I agree, there is no question here really. unless your question is ... "please give me the playbook".
Not sure whether such a request meets the nature of such a mailing list really though.

Paul Manno

unread,
Jun 18, 2022, 11:39:29 AM6/18/22
to ansible...@googlegroups.com
Are you trying to write an ansible playbook that runs as a service to load balance backends? That's not how ansible works. Sounds like you need a load balancer like nginx or haproxy. 

Sent from my T-Mobile 5G Device
Get Outlook for Android

From: ansible...@googlegroups.com <ansible...@googlegroups.com> on behalf of Abhijeet Kasurde <akas...@redhat.com>
Sent: Saturday, June 18, 2022 9:04:17 AM
To: ansible...@googlegroups.com <ansible...@googlegroups.com>
Subject: Re: [ansible-project] Ansible galaxy Role
 

Abhijeet Kasurde

unread,
Jun 18, 2022, 12:01:01 PM6/18/22
to ansible...@googlegroups.com
I found this https://galaxy.ansible.com/dipuyadav/configure_httpd_with_haproxy_role, I never tried it myself, but you can take a look.



--
Thanks,
Abhijeet Kasurde

Rock

unread,
Jun 18, 2022, 12:51:28 PM6/18/22
to Ansible Project
Actually my question is from my last try for RHCE 294 Exam, and i was not able to solve it,
anyway thanks for all of you 

Rilindo Foster

unread,
Jun 18, 2022, 12:57:12 PM6/18/22
to ansible...@googlegroups.com
HI there,

You probably won’t get any direct answers on this, since Red Hat exams are under NDA. I will say that most tasks in question will provide enough detail that you should be able to complete the objective. So the next time you take the test, review environment and tasks carefully.

- Rilindo

Reply all
Reply to author
Forward
0 new messages