DevOps Classroom notes 29/Feb/2024

Activity 4: Install tomcat (contd)

  • manual step: change permissions for all shell files
sudo sh -c 'chmod +x /opt/tomcat/bin/*.sh' 
  • This can be acheived by command modules Refer Here. But command modules are not idempotent i.e. they execute all the time whenever playbook is executed
  • Refer Here for the command module implementation
  • Refer Here for registering a variable and using that in next tasks

Verbosity in Ansible

module return values

  • Every module has return values and they can be registred Refer Here

loops in ansible

Exercise

  • Make the playbook work for centos
  • Download tomcat only if the folder /opt/tomcat/apache-tomcat-10.0.10 does not exist.
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%