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 comment

Turn on JavaScript to leave a comment.

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
Exit mobile version
%%footer%%