Ansible Runner

...
  • Ansible
  • Runner
About 2 min

# Ansible Runner

Commandeer allows you to run Ansible repeatedly, consistently, and conveniently. All from its desktop GUI.

# Choose Playbook File

The first step is to choose your playbook file, usually named as playbook.yml.

Choosing your playbook file in Commandeer

Once the file is chosen, Commandeer intelligently applies a set of most common defaults and you're all set to run your Ansible project. Here is an example of a typical playbook.yml file including multiple Ansible files.

---
- hosts: localhost
  tasks:
    - import_tasks: s3-buckets.yml
    - import_tasks: dynamo-tables.yml
    - import_tasks: cloud-front.yml

# Run Ansible

Click on the run button to start the run. The terminal output will show up on the right-hand side. Once the run is finished, you'll see the results of the run right above the output.

Commandeer ran with the Car Dynamo table created

# Edit Files

Once the file is chosen, you'll see your project folder in the side navigation. Clicking on a file in the side navigation opens the content in the file editor pane. You can make any modifications and save it at any time.

Editing the playbook file in Commandeer

# Share Code

Clicking on the share button brings up a dialog allowing you to share your Ansible code over email, Slack, or SMS. You can also copy the code to your clipboard by clicking the Copy to Clipboard button.

Emaling your Ansible file to your colleague

# Edit Variables

Ansible lets you define some custom variables in your templates. You can use the variables to customize your templates. Here is an example of using a custom variable to customize the name of the Car DynamoDB table for your environment:

---
- hosts: localhost
  remote_user: bob
  tasks:
    - name: Create the Car table
      dynamodb_table:
        name: Car-{{ environment }} # <-- your custom variable here
        hash_key_name: id
        hash_key_type: STRING
        read_capacity: 1
        write_capacity: 1

Commandeer allows you to add, remove, and edit your Ansible variables from the settings panel.

Editing an Ansible variable in Commandeer

# Copy Command

You can copy the command for your run from the Terminal Command panel. Commandeer generates the command based on your settings and your selected account.

# Conclusion

Ansible is a great tool to have under your toolbelt. Once your configuration is written, you can run it against any environment including local. Commandeer helps you to be more productive with writing and running your Ansible configuration against different environments. It gets you up and running with Ansible quickly so you can start developing and running your Ansible scripts in no time.

Last update: July 26, 2020 22:45