Git Product home page Git Product logo

armbian-ansible-roles's Introduction

Galaxy

This collection contains a module for gathering facts on Armbian. More Armbian related things may be added in the future.

Ansible 2.9 and later is required.

The module parses /etc/armbian-release and stores the result in ansible_facts.armbian. Here is an example:

"ansible_facts": {
    "armbian": {
        "arch": "arm",
        "board": "orangepiplus2e",
        "board_family": "sun8i",
        "board_name": "Orange Pi+ 2E",
        "board_type": "conf",
        "branch": "current",
        "build_repository_commit": "e6fa811d-dirty",
        "build_repository_url": "https://github.com/armbian/build",
        "distribution_codename": "buster",
        "distribution_status": "supported",
        "image_type": "stable",
        "initrd_arch": "arm",
        "kernel_image_type": "Image",
        "linux_family": "sunxi",
        "version": "20.08.1"
    }
}

If /etc/armbian-release is not available ansible_facts.armbian will be an empty dictionary. It is safe to run this on non-Armbian hosts without causing your playbook to fail. See ansible-doc armbian.armbian.armbian_facts for more details.

Installation

ansible-galaxy collection install armbian.armbian

Usage

This module can either be called explicitly by a task or added to the list of FACTS_MODULES that run automatically during the fact gathering stage.

Adding to the default Facts Modules

Add the module to the configuration:

[default]
facts_modules = armbian.armbian.armbian_facts

This means that any time fact gathering is run, armbian_facts will be run in addition to the default fact gathering. This can be done in a playbook:

- hosts: armbian
  gather_facts: yes

Or ad hoc:

ansible all -m armbian.armbian.armbian_facts
ansible all -m gather_facts

Explicit Task

You can call the module at any time using a task. Since this is a facts module, there is no need to register the output. The returned facts will automatically be set for the host. If fact caching is enabled, the gathered facts will be cached.

- hosts: armbian
  gather_facts: yes
  
  tasks:
    - name: Gather Armbian facts
      armbian.armbian.armbian_facts

Modules in this Collection

  • armbian.armbian.armbian_facts - Gather facts about Armbian.

armbian-ansible-roles's People

Contributors

samdoran avatar lanefu avatar

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.