The Git Module

The ‘Git Module’ allows us to manage git checkouts to deploy software. For Example:

# Example read-write git checkout
- git:
    repo: ssh://
    dest: /home/folder/yourrepo

The Script Module

This module takes the script name that runs locally on the remote system. This is a good feature as other ways to run a script on ansible is time taking. This is also called the shell module. For example:

- script: /some/local/ --some-arguments testvar
    creates: /the/created/sample.txt

The Mail Module

This module is useful for sending emails using ansible. In complex environments there are processes that cannot be automated, either because lack of authority to make it or because people disagrees to a common approach. For example,

# Sending an e-mail from Gmail using ansible
- mail:
    port: 587
    password: mypassword
    to: mail receiver<>
    subject: Type your subject
    body: 'This is your body.'
  delegate_to: localhost

The Notification Module

Send notification message via Slack.

- hosts: name_of_server
   - name: Send notification message through Slack
         module: slack
         # To retrieve your slack token, open your team settings.
         token: //
         msg: "Hello"
         channel: "#general"
         username: "ansible-notification-bot"

The syslogger Module

This module helps to add log entries to the host computer.

# Full example
- name: Test syslog
    msg: "Your message"
    priority: "err"
    facility: "daemon"
    log_pid: true

# Basic usage
- name: Simple Usage
    msg: "File saved as"