Code Monkey home page Code Monkey logo

ansible-crystal's Introduction

pipeline

ansible-crystal

The github repository is just a mirror of https://gitlab.com/CorbanR/ansible-crystal please submit all issues and merge requests to gitlab.

Role to install crystal-lang. This role offers two installation methods.

  1. Via apt or yum repositories
  2. Pre-compiled binaries from crystals github releases

Requirements

Ansible >= 9.0 Ansible-Core >= 2.16

Role Variables

This role supports multiple installation methods. Installation types are repository or standalone
crystal_install_method: repository

# See defaults/main.yml for additional calculated variables that may be overriden
# Latest or present
crystal_state: present
# Only applies to (Debian/Ubuntu)
crystal_install_recommends: true
# Options are stable, unstable, nightly 
crystal_channel: stable
# Options are true, false
crystal_remove_old_repositories: true

You can specify the apt/deb, or yum/rpm package version by setting crystal_version_repository_override
Example: crystal_version_repository_override: crystal={{crystal_version}}-{{crystal_revision}} to specify the apt/deb package version.

When standalone installation type, specify crystal version, platform, arch, release, and checksum of tar.gz.
see the crystal release page for more information. The standalone installation type creates two symlinks, /usr/local/bin/crystal and /usr/local/bin/crystal-{{ crystal_version }}

crystal_version: 1.12.1
crystal_revision: 1
crystal_platform: "{{ ansible_system | lower | default('linux') }}"
crystal_arch: "{{ ansible_architecture | default('x86_64') }}"
crystal_release: "crystal-{{ crystal_version }}-{{ crystal_revision }}-{{ crystal_platform }}-{{ crystal_arch }}"
crystal_checksum: "sha256:596d2ba9269b6f394d9e2298b0fa14c3fafd4733ed02847cfa496eeeb6a070e3"

Optionally install additional packages required to compile crystal code.
crystal_build_deps: false

Installation

$ansible-galaxy install CorbanR.crystal

Example Playbook

- hosts: all
  roles:
     - { role: CorbanR.crystal, crystal_install_method: repository, crystal_build_deps: true }

Running Tests

The easiest way to get an environment that can run tests is to

  1. Have docker installed
  2. Create a python virtualenv
  3. Install dependencies via pip install -r molecule/requirements.txt
  4. Run molecule test

If you have nix installed you can run nix-shell, or nix develop(if using flakes). Once you are in a nix shell run pip install -r molecule/requirements.txt

License

MIT / BSD

Author Information

Corban Raun
https://raunco.co

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.