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:
- Deploy the .zip file into server
- 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