DevOps Classroom Series – 13/May/2021

Ansible inventory and variables

  • Assigning variables in inventory
  • Made changes to spring pet-clinic to have variables separated in a file Refer Here
  • In Ansible we have some behavioral inventory parameters

Scenario: Fail the ansible playbook execution if it executed on OS other than ubuntu

  • We need to understand the approach on how ansible finds out the information about node.
  • Ansible has a module called as setup Refer Here
  • For ansible conditional statement Refer Here Preview

Scenario: Show messages of what ansible is doing w.r.t application deployment to the user

  • We have added debug messages Refer Here
  • The message are execute and displayed every time Preview
  • We want to display the message only when the java is installed or when task actually makes the changes Refer Here
  • Refer Here for the changes

Leave a Reply

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

About learningthoughtsadmin