Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use ansible to script eclipse installation and configuration?

I am an ansible newbee, so please forgive if this is obvious or well covered elsewhere.

I want to script the setup of a developer virtual machine using Vagrant. Part of the task is to install (simple) and configure eclipse (i.e. install plugins and features, import formatting settings and other workspace configurations etc. -- not so simple).

I could use the shell provisioner plus some scripts that automate the eclipse setup. Or I could try to use the ansible provisioner. Can ansible help me here? Are there any ansible modules that provide solutions for standard eclipse setup tasks?

Of course I could create a suitable eclipse installation manually and then pack and distribute that. In order to make this repeatable I would need to document all the steps and make sure that this documentation is complete. This is not what I want to do. I want to script the installation process so that it can be repeated and extended at any time.

like image 475
Jan Avatar asked Mar 14 '23 00:03

Jan


2 Answers

Instead of an external, generic tool like Ansible, you could use Eclipse Oomph to configure an Eclipse installation and workspace for the VMs. Oomph is the technology behind Eclipse's own installer, but it's designed to be a generic configuration management tool for any Eclipse-based "products." There's a learning curve, but one of Oomph's stated purposes is to support the situation you're facing. For starters, see the Oomph Authoring Guide.

like image 103
E-Riz Avatar answered Apr 27 '23 22:04

E-Riz


The following ansible role installs Eclipse + plugins: https://github.com/AlbanAndrieu/ansible-eclipse

The maintainer also provide a docker container to run the generated eclipse installation (without installing ansible locally).

like image 32
Nico Toub Avatar answered Apr 27 '23 22:04

Nico Toub