Skip to content
This repository has been archived by the owner on Aug 29, 2021. It is now read-only.
/ ansible-ct-filter Public archive

Container Linux Config Transpiler filter for Ansible. Filters a Container Linux Configuration YAML into an Ignition Configuration.

License

Notifications You must be signed in to change notification settings

haz-mat/ansible-ct-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

ansible-ct-filter

Container Linux Config Transpiler filter for Ansible. Filters a Container Linux Configuration YAML into an Ignition Configuration.

Dependencies

Typical working directory

./filter_plugins/ct.py
./bin/ct

Usage

# Platform argument to ct() required.
# Note the usage of the string filter. This prevents
#   the resulting json object from being marshalled
#   into a dictionary.
user_data: "{{ container_linux_config_data | ct('ec2') | string }}"

In a playbook

---
- hosts: localhost
  vars:
    cl_config:
      etcd:
        version: 3.0.15
        name: '{HOSTNAME}'
        listen_client_urls: >
          http://{PRIVATE_IPV4}:2379,
          http://localhost:2379
        discovery_srv: 'example.com'
        proxy: 'on'
      locksmith:
        reboot_strategy: 'etcd-lock'
      update:
        group: 'stable'
      flannel:
        version: 0.7.0
      systemd:
        units:
          - name: flanneld.service
            enable: true
            dropins:
              - name: 50-network-config.conf
                contents: |
                  [Service]
                  ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config \
                    "{\"Network\":\"10.10.41.0/20\", \
                      \"SubnetLen\": 28, \
                      \"SubnetMin\": \"10.10.41.0\", \
                      \"SubnetMax\": \"10.10.47.240\" \
                    }"
  tasks:
    - debug:
        msg: "{{cl_config|ct('ec2')}}"

About

Container Linux Config Transpiler filter for Ansible. Filters a Container Linux Configuration YAML into an Ignition Configuration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages