7

Currently I'm developing ansible orchestration system. The project structure is something like this:

site.yml webservers.yml fooservers.yml roles/ common/ files/ templates/ tasks/ handlers/ vars/ defaults/ meta/ webservers/ files/ templates/ tasks/ handlers/ vars/ defaults/ meta/

As a result I have to deal with dozens of play-books, roles, subdirectories, tasks, variable files, so on. For now, I use WinSCP as a kind of IDE (I work from Windows dev machine) This solution is far from being perfect but allow me easy navigation among files and folders. In fact I miss Visual Studio (intellisense!) very much. I tried Eclipse installed on my dev machine before but it was too slow. I found shell tools rather uncomfortable. Due to corporate constraints I can not add any more VM-s.

So, my question is: are there any Windows (or lightweight Ubuntu GUI) tools to deal with complicated structure of files and folders for Linux development?

Na Na
  • 818
  • 3
  • 13
  • 19

6 Answers6

6

JetBrains-based IDEs have a YAML/Ansible plugin to add some context and syntax highlighting to Ansible playbook structure.

Sublime has a plugin to add syntax highlighting to Ansible files https://github.com/clifford-github/sublime-ansible

Both tools can display folder structure and connect using sftp/ssh to remote servers.

Mxx
  • 8,979
  • 4
  • 27
  • 37
3

Vim is not considered an IDE by all, but I (work on and) use Rocannon for Ansible every day for its auto-completion, syntax highlighting, built-in help and other IDE-like features.

Vim is not a very quick learn, but it is light. :)

There's a GIF demo on the Rocannon github page to give you a feel for what it offers.

Micah Elliott
  • 9,600
  • 5
  • 51
  • 54
2

Here is the official list of IDE's or editors: https://docs.ansible.com/ansible/latest/community/other_tools_and_programs.html#popular-editors

Currently it seems your best option is Visual Studio Code since it has auto-completion and syntax highlighting specifically for Ansible.

Ivan Baldo
  • 320
  • 2
  • 7
2

I wrote a plugin for IntelliJ-based IDEs that help working with ansible files. it auto-complete all fields and can detect roles and suggest them.

https://plugins.jetbrains.com/plugin/14893-ansible

Mohammad Sadegh
  • 747
  • 11
  • 25
1

Ansible SHOULD have an IDE that validates both the YAML lint and the syntactical errors of ansible itself (version dependent). It is such a waste of time to have to run and debug and run into things over and over, the latest example being this: "msg": "unsupported parameter for module: register"}

When all you do is:

- name: gather rds instance facts
  rds:
    command: facts
    instance_name: "{{ wp_db_instance }}"
    register: database_facts

vs:

- name: gather rds instance facts
  rds:
    command: facts
    instance_name: "{{ wp_db_instance }}"
  register: database_facts

Notice the indentation. Which is why YAML is a pain.

eco
  • 1,254
  • 1
  • 12
  • 22
0

Netbeans understands yaml but does not have support for Ansible Playbook or even generic projects. So I create a PHP project from exising sources and point that at my ansible playbook.

  • PLUS I do all my coding apart from python in Netbeans
  • PLUS yaml syntax highlighting helps a lot
  • PLUS git integration ('cos you do keep your playbook in a scm)

  • MINUS no ansible awareness at all eg help with finding variable declarations

JamesP
  • 602
  • 6
  • 12