DevOps Classroomnotes 14/Aug/2022

Ansible magic variables

  • Refer Here for the official docs of the magic variables
  • Magic variables cannot be set by the user and are set by ansible
  • Lets write a small playbook to display some magic variables. Refer Here for the changeset containing magic variables
  • Connection Variables: These variables can be used to change the way ansible executes the playbook Refer Here. Refer Here for the changes done

Ansible Logging Settings

  • Refer Here for changing the logging settings of ansible

Ansible with Windows Server

  • Ansible control node has to be linux server, where as ansible nodes can be windows servers also
  • Windows servers do not support ssh, they have a protocol which is referred as winrm
  • Winrm setup on windows server
  • Create a windows server and ensure this server is accesible from Ansible control node
  • Ansible use winRM protocol to establish the communication with Windows Hosts
  • Ansible requires atleast Powershell 3.0 or newer and atleast .net 4.0
  • Steps for configuring windows Node:
    • Login into windows node
    • Launch Powershell as Admin and execute the following steps Refer Here
    • Create a file with the following content c:\ConfigureAnsibleRemoting.ps1
  • Refer Here to this classroom notes for configuring windows server as an ansible node
  • Check the win_ping with the inventory with following content


* Refer Here for the modules for windows servers

  • Refer Here for the changes done to install some softwares on windows
  • Refer Here for the changes added to install iis server

Ansible Vault

  • Refer Here for Features of Ansible Vault.
  • Refer Here the following blog for playing with ansible vault

Ansible Tower

  • The video for this will be shared and use that as a reference to understand ansible tower

Ansible Integration with Jenkins

  • Ansible Control Node will be a node in Jenkins.
  • While creating Jenkins pipeline, we use the node where ansible is installed, get the latest playbooks to install the software in various environments and call the ansible-playbook command line from jenkins pipelines

Ansible Integration with Azure DevOps

  • Ansible control node will be an agent in azure devops and from azure devops pipeline we get the latest playbooks and execute the ansible-playbook command.

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner