diodonfrost.sonar_scanner

ansible-role-sonar-scanner

molecule Ansible Galaxy

This role helps you install sonar-scanner on your target machine.

Requirements

This role was made using Ansible version 2.5. Compatibility with older versions is not guaranteed. Use ansible-galaxy install diodonfrost.sonar_scanner to install the role.

Supported platforms:

- name: EL
  versions:
    - 8
    - 7
    - 6
- name: Fedora
  versions:
    - 31
    - 30
    - 29
    - 28
    - 27
    - 26
- name: Debian
  versions:
    - stretch
    - jessie
    - wheezy
    - squeeze
- name: Ubuntu
  versions:
    - disco
    - bionic
    - xenial
    - trusty
    - precise
- name: OracleLinux
  versions:
    - 7
    - 6
- name: Amazon
  versions:
    - 2017.12
    - 2016.03
    - 2013.09
- name: opensuse
  versions:
    - 42.3
    - 42.2
    - 42.1
    - 13.2
- name: SLES
  versions:
    - 15
- name: ArchLinux
  versions:
    - any
- name: Alpine
  versions:
    - any
- name: Gentoo
  versions:
    - stage3
- name: MacOSX
  versions:
    - 10.13
    - 10.12
    - 10.11
    - 10.10
- name: Windows
  versions:
    - 2016
    - 2012R2
    - 8.1

Role Variables

This role includes several variables. Here are their default values:

---
# Default settings for ansible-role-sonar-scanner

# Specify the sonar-scanner version to install
# Check possible values here: https://api.github.com/repos/sonarsource/sonar-scanner-cli/tags
# Default is: latest
sonar_scanner_version: latest

# Define where to install the Sonar Scanner client
# Default for Linux/Unix systems: /opt
sonar_scanner_directory: "{{ sonar_scanner_default_directory }}"

# Define where to install the Sonar Scanner client binary
# Default for Linux/Unix: /usr/local/bin
# Default for Windows: %PROGRAMFILES%
sonar_scanner_path: "{{ sonar_scanner_default_path }}"

Dependencies

No dependencies.

Example Playbook

Here’s a simple playbook to deploy the Ansible Galaxy sonar-scanner role on a localhost and install the latest version.

---
- hosts: localhost
  become: true
  roles:
    - role: diodonfrost.sonar_scanner

You can also specify a particular version of sonar-scanner.

---
- hosts: localhost
  become: true
  roles:
    - role: ansible-role-sonar_scanner
      vars:
        sonar-scanner_version: 3.3.0.1492

Local Testing

This project uses Molecule for development and testing.

To develop or test, you'll need to install the following software:

Testing with Docker

# Test ansible role with centos 8
molecule test

# Test ansible role with ubuntu 20.04
image=ansible-ubuntu:20.04 molecule test

# Test ansible role with alpine
image=ansible-alpine:latest molecule test

# Create centos 7 instance
image=ansible-centos:7 molecule create

# Apply role on centos 7 instance
image=ansible-centos:7 molecule converge

# Run tests on centos 7 instance
image=ansible-centos:7 molecule verify

Testing with Vagrant and Virtualbox

# Test ansible role with Windows
molecule test -s windows

License

Apache 2

Author Information

This role was created by diodonfrost in 2019.

Informazioni sul progetto

Ansible role - sonar-scanner

Installa
ansible-galaxy install diodonfrost.sonar_scanner
Licenza
apache-2.0
Download
18.3k
Proprietario