Skip to content

Instantly share code, notes, and snippets.

@pythoninthegrass
Created August 29, 2024 21:16
Show Gist options
  • Save pythoninthegrass/8aa9e76589d67dc814b956ac4d68b239 to your computer and use it in GitHub Desktop.
Save pythoninthegrass/8aa9e76589d67dc814b956ac4d68b239 to your computer and use it in GitHub Desktop.
Kestra mvp for inline ansible inventory and playbook. Alternative is namespace files or the git plugin
id: ansible
namespace: company.team
tasks:
- id: ansible_task
type: io.kestra.plugin.ansible.cli.AnsibleCLI
inputFiles:
inventory.ini: |
localhost ansible_connection=local
myplaybook.yml: |
---
- hosts: localhost
become: false
gather_facts: false
tasks:
- name: Print Hello World
debug:
msg: "Hello, World!"
docker:
image: cytopia/ansible:latest-tools
pullPolicy: IF_NOT_PRESENT
cpu:
cpus: 3
memory:
memory: "128MB"
commands:
- ansible-playbook -i inventory.ini myplaybook.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment