Get Yourself GOing with Ansible

Get Yourself GOing with Ansible

While most Ansible modules are written in Python, that’s not the only option you have. If you like Go, this post is for you!

In a previous post, we explored how Ansible can integrate with Google Calendar for Change Management, without getting into the details of the Ansible module that was built for this purpose. In this post, we will cover the nuts and bolts of it.

While most Ansible modules are written in Python (see this example), that’s not the only option you have. You can use other programming languages as well if you prefer so. And if you like Go, this post is for you!

If you are new to Go on the other hand, here are some pointers to get started.

Ansible and Go

There are at least four different ways that you can run a Go program from Ansible. You can either:

1. Install Go and run your Go code with the go run command from Ansible.

2. Cross compile your Go code for different platforms before execution. Then call the proper binary from Ansible, based on the facts you collect from the host.

3. Run your Go code or compiled binary from a container with the containers.podman collection. Something along the lines of:

- name: Run Go container
      podman_container:
        name: go_test_container
        image: golang
        command: go version
        rm: true
        log_options: "path={{ log_file }}"

software-development software-engineering programming ansible golang

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Software Developer vs Software Engineer — Differences: Bogus or Real?

In this article, see if there are any differences between software developers and software engineers. What you’re about to read mostly revolves around my personal thoughts, deductions, and offbeat imagination. If you have different sentiments, add them in the comment section, and let’s dispute! So, today’s topic…

Offshore Software Development - Best Practices

To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.

Golang Web Development:Th Best Programming Language in 2020

Golang Web Development is the new trend globally. Get all the details about the Golang development here. Hire Golang Developers.

5 Core Criteria for Selecting Software Development Company - TopDevelopers.co

Check out these five criteria for the selection of your software vendor, and you will never regret having the wrong quality product made for you.

Wrestling Betting Software Development | WWE Betting Software Developers

Wrestling betting software development solutions from expert Wrestling betting app and software development company delivers ultimate betting experience. Chat with us.