wcm_io_devops.conga_maven
wcm_io_devops.conga_maven
This role creates the setup for a CONGA environment using Maven. You can either use your own configuration files (like in the same repository as the Ansible setup) or use a Git repository that this role will clone and update as needed.
This role is part of the wcm.io DevOps Ansible Automation for AEM which connects Ansible with CONGA.
Requirements
To use this role, you must have Maven installed, and you can also install Git if you want to pull configuration from a Git repository. Both Maven and Git need to be set up to access the repositories and resources required for CONGA. This role needs to be run on the Ansible host (your own machine) because wcm_io_devops.conga_facts runs locally. This is important so the configuration generated by this role can be accessed.
Role Variables
Here are the main variables you can use (see defaults/main.yml
for default values):
- conga_environment: The name of the CONGA environment you want to set up.
By default, this variable determines which environment's configuration gets created. It’s best to consistently use this variable throughout your Ansible-CONGA setup for a specific environment.
- conga_basedir: The main directory for CONGA configuration.
If you’re not using a Git repository, this variable should point to where your CONGA configuration files are located (where the pom.xml
file is). If you do use Git, it’s automatically set from conga_maven_git_root
and conga_maven_root
.
- conga_maven_git_repo: The URL of the Git repository for the configuration, default is "https://github.com/wcm-io-devops/conga.git".
- conga_maven_git_root: Where to clone the configuration in your file system, default is
/tmp/git
. - conga_maven_git_branch: The branch of the Git repo to checkout, default is
develop
.
If you want to pull from a Git repo, you must set conga_maven_git_repo
. If not set, the Git-related part of this role will be skipped, and you must manually set conga_basedir
.
- conga_maven_root: The top directory of the CONGA configuration, default is
configuration
. - conga_maven_cmd: The Maven command to run, default is
mvn
. - conga_maven_opts: Options to use with Maven (like running smoothly, updating snapshots, and compiling only for one environment).
- conga_maven_settings: Path to a custom Maven settings file (default is
~/.m2/settings.xml
). - conga_maven_vault_password_file: Path to a file with Vault passwords (defaults to Ansible config).
These variables allow you to control how Maven runs, for example, by providing the path to the Maven executable or a custom settings file.
Dependencies
This role does not have direct dependencies on others, but it is meant to be used with the wcm_io_devops.conga_facts role/plugin. This combination helps read the CONGA configuration and turn it into Ansible variables. For this to work, the conga_basedir
variable must point to the CONGA configuration directory.
Example Playbook
To create an example CONGA configuration for the
prod
environment:- hosts: localhost vars: conga_environment: prod roles: - { role: wcm_io_devops.conga_maven, conga_maven_git_repo: "https://github.com/wcm-io-devops/conga.git", conga_maven_git_branch: master, conga_maven_root: example }
To create a CONGA configuration for the
dev
environment from a localconfig-definition
directory:- hosts: localhost vars: conga_environment: dev roles: - { role: wcm_io_devops.conga_maven, conga_basedir: config-definition }
ansible-galaxy install wcm_io_devops.conga_maven