constrict0r.sourcez

Sourcez Documentation

Pipeline Badge Travis Badge Read the Docs Badge

This is an Ansible role for adding repositories to the apt sources.

Avatar

For complete documentation, visit Readthedocs.

Check the source code on:

Related project: Doombot

Doombot

Ingredients

Ingredient

Contents

Description

This Ansible role adds apt repositories to the system.

Key actions performed by this role:

  • Install necessary requirements.
  • Ensure the user has administrative (root) permissions.
  • If the repositories variable is set, it will add those repositories to the apt sources.
  • If the configuration variable is set, it will similarly add those repositories.

Usage

To install and run:

ansible-galaxy install constrict0r.sourcez
ansible localhost -m include_role -a name=constrict0r.sourcez -K

Passing variables:

ansible localhost -m include_role -a name=constrict0r.sourcez -K \
    -e "{repositories: [{name: multimedia, repo: 'deb http://www.debian-multimedia.org sid main'}]}"

Including in a playbook:

- hosts: servers
  roles:
    - {role: constrict0r.sourcez}

Using as a dependency in another role:

dependencies:
  - role: constrict0r.sourcez
    repositories: [{name: multimedia, repo: 'deb http://www.debian-multimedia.org sid main'}]

Running role from tasks:

- name: Run role task
  import_role:
    name: constrict0r.sourcez
  vars:
    repositories: [{name: multimedia, repo: 'deb http://www.debian-multimedia.org sid main'}]

To run tests:

cd sourcez
chmod +x testme.sh
./testme.sh

Note: You might need to use sudo for some tests.

Variables

Supported Variables:

repositories

A list of repositories to be added to the apt sources. Can be modified when including the role in a playbook or using --extra-vars from the terminal. Default is empty.

configuration

A file path or URL to a .yml file with variables for this role. Default is empty.

YAML

When using configuration files, add a .yml or .yaml extension. Start each file with three dashes:

---

Include variables needed for your tasks:

---
repositories:
  - [{name: multimedia, repo: 'deb http://www.debian-multimedia.org sid main'}]

If you want to load items from files/URLs, set the expand variable to true.

Attributes

Use attributes to configure data handling:

item_expand

A boolean value to indicate if an item should be treated as a file path/URL or plain text.

---
repositories:
  - item_expand: true
    item_path: /home/username/my-config.yml

item_path

A file path or URL to a .yml file.

---
repositories:
  - item_path: /home/username/my-config.yml

Requirements

  • Ansible >= 2.8
  • Jinja2
  • Pip
  • Python
  • PyYAML
  • Requests

For running tests, you'll need:

  • Docker
  • Molecule
  • Setuptools

Compatibility

  • Debian Buster
  • Debian Raspbian
  • Debian Stretch
  • Ubuntu Xenial

License

MIT. See the LICENSE file for more details.

UML

Deployment

Deployment

Main

Main

Author

Author

The Travelling Vaudeville Villain.

Enjoy!!!

Enjoy

Informazioni sul progetto

Add apt repositories to Debian sources.

Installa
ansible-galaxy install constrict0r.sourcez
Licenza
mit
Download
2k
Proprietario
The Traveling Vaudeville Villain Gitlab: gitlab.com/constrict0r - Blog: geekl0g.wordpress.com - Twitter: twitter.com/constrict0r - Functional Café: is.gd/YDqy