Skip to content

ThomasSteinbach/yedit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 

Repository files navigation

yedit repository

Description

This repository contains an ansible module for modifying yaml files.

I didn’t see a good method of editing yaml files and config managing them through ansible. This is my attempt.

Directory Structure

yedit
├── roles                Contains the ansible role for lib_yaml_editor
├── test                 python unit tests for yedit

Examples:

Sometimes it is necesarry to config manage .yml files.

- hosts: localhost
  gather_facts: no
  roles:
  - roles/lib_yaml_editor
  tasks:
  - name: manage yaml files
    yedit:
      src: /tmp/test.yaml
      key: a#b#c
      value:
        d:
          e:
            f:
              this is a test

  - name: get a specific value
    yedit:
      src: /tmp/test.yaml
      state: list
      key: a#b#c#d#e#f
    register: yeditout
  - debug: var=yeditout

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%