Menu

Post image 1
Post image 2
1 / 2
0

4.Ansible Unarchive Module

DEV Community: ansible·Thu Kha Kyawe·3 days ago
#AQhwaMoo
Reading 0:00
15s threshold

Lab Information One of the DevOps team members has created a zip archive on jump host in Stratos DC that needs to be extracted and copied over to all app servers in Stratos DC itself. Because this is a routine task, the Nautilus DevOps team has suggested automating it. We can use Ansible since we have been using it for other automation tasks. Below you can find more details about the task: We have an inventory file under /home/thor/ansible directory on jump host, which should have all the app servers added already. There is a zip archive /usr/src/itadmin/xfusion.zip on jump host. Create a playbook.yml under /home/thor/ansible/ directory on jump host itself to perform the below given tasks. Unzip /usr/src/itadmin/xfusion.zip archive in /opt/itadmin/ location on all app servers. Make sure the extracted data must has the respective sudo user as their user and group owner, i.e tony for app server 1, steve for app server 2, banner for app server 3. The extracted data permissions must be 0744.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More