Ansible roles and tasks

24 views
Skip to first unread message

Amarnatha Reddy

unread,
Feb 19, 2020, 4:51:41 AM2/19/20
to ansible...@googlegroups.com
Hi All,

I am planning to implement Ansible to do some tasks as per  my requirement!
Need ansible project structure guidance to process mix of roles and tasks.

Tasks: 
  1. Deploy the .zip file into server
  2. After deploy clear cache on the server
Task1: We are using CI/CD operations through jenkins , as part of build .zip files will be crated on jenkins server and using command/shell module deploy the artifacts based on selected environment (ex: qa1,qa2,etc..) from jenkins machine.
Task2: After deployment same thing needs to trigger some command from jenkins to remote machine to clear the cache.

Inventory: For the first task hosts file is used with username/pwd via http  method to connect remote servers and perform the commands

For the task2 we need to connect via ssh key (same command module)as servers are different.
 
So how can i write 2 tasks with hosts and roles for my requirement.


Thanks,
Amaranth Polu





------------------------------

Thanks and Regards,

Amarnath Polu

Dick Visser

unread,
Feb 19, 2020, 6:38:33 AM2/19/20
to ansible...@googlegroups.com
What do you have so far?

--
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/CA%2BdKxYwq3rzy_KX4SZU11ZRAmXjN8iAY6THE3SPHWzkgHK1xXQ%40mail.gmail.com.


--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
Reply all
Reply to author
Forward
0 new messages