Ansible roles and other artifacts for managing MOC openshift cluster.
We use this to create DNS and DHCP entries for openshift hosts.
The ignition_encode
filter encodes files for use in the contents
key of an Ignition file
specification.
The filter was designed primarily for use when creating new
MachineConfiguration objects when using the k8s module.
You can use it in combination with Ansible's lookup function to
include the content of files in your MachineConfiguration
resources.
- name: create an example file on worker nodes
k8s:
state: present
definition:
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
name: 50-example-file
labels:
machineconfiguration.openshift.io/role: worker
spec:
config:
ignition:
version: 2.2.0
storage:
files:
- filesystem: root
path: /etc/example-file
contents:
source: "{{ lookup('file', 'example-file') | ignition_encode }}"
mode: 0644