Container image and helm chart for ansible control node
apiVersion: v1
kind: ConfigMap
data:
hosts: |
ubuntu_workspaces:
hosts:
u-1c6uucjay64tr.foobar.local:
metadata:
name: ansible-hosts
namespace: default
apiVersion: v1
kind: ConfigMap
data:
playbook.yaml: |
- name: My first play
hosts: ubuntu_workspaces
tasks:
- name: Ping my hosts
ansible.builtin.ping:
- name: Print message
ansible.builtin.debug:
msg: Hello world
metadata:
name: ansible-playbook
namespace: default
Output all hosts info, works as inventory script:
ansible-inventory --list
Run the playbook:
ansible-playbook /etc/ansible/playbook.yaml