Code Monkey home page Code Monkey logo

autonomic.gandi's Introduction

autonomic.gandi

Build Status

Ansible libraries for managing Gandi resources.

Example

---
- hosts: localhost
  gather_facts: false
  connection: local
  tasks:
    - name: Prepare Python dependencies
      become: true
      apt:
        name: python3-pip
        state: present

    - name: Install dns-lexicon system wide
      become: true
      pip:
        name: "{{ item }}"
        executable: /usr/bin/pip3
      with_items:
        - dns-lexicon==3.3.19
        - cryptography==2.8

    - name: Create foobar.autonomic.zone
      gandi_dns:
        gandi_rest_token: abc...
        domain: foobar.autonomic.zone
        ipv4: 94.130.105.60
        state: present

Features

  • Create a new DNS entry
  • Delete an existing DNS entry
  • Update an existing DNS entry

Requirements

$ pip install ansible==2.6.9 dns-lexicon==3.3.19

These should be present on the localhost where you run Ansible.

Gandi DNS Setup

If you want to use the gandi_dns module you need to prepare the environment.

export PROVIDER="gandi"
export LEXICON_GANDI_AUTH_TOKEN="${pass show users/decentral1se/gandi/api_key)"
export LEXICON_GANDI_API_PROTOCOL="rest"

You can test that everything is working by running the following.

$ lexicon gandi list autonomic.zone A

The gandi_dns module will provide the PROVIDER and LEXICON_GANDI_API_PROTOCOL environment variables internally so you only need to pass LEXICON_GANDI_AUTH_TOKEN as the gandi_rest_token argument to the task or expose it in the environment and it will be picked up.

Usage

Include an entry in your requirements.yml like so.

- src: https://git.autonomic.zone/autonomic-cooperative/autonomic.gandi/archive/0.0.5.tar.gz
  name: autonomic.gandi

See the releases for which is the latest version.

Then make sure to download the role with ansible-galaxy install -r requirements.yml.

Note, we also keep a mirror on git.coop for when we run internal Gitea upgrades.

- src: https://git.coop/decentral1se/autonomic.gandi/-/archive/0.0.5/autonomic.gandi-0.0.5.tar.gz
  name: autonomic.gandi

autonomic.gandi's People

Contributors

decentral1se avatar

Stargazers

 avatar

Watchers

 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.