Skip to content

Instantly share code, notes, and snippets.

@czunker
czunker / gist:ee29f077a0babcf6f2ce847c29823e8c
Created April 27, 2023 04:38
Manifest with two CronJobs, one with namespace, the other one without namespace
apiVersion: batch/v1
kind: CronJob
metadata:
name: hello
namespace: default
spec:
schedule: "* * * * *"
jobTemplate:
spec:
template:
@czunker
czunker / README.md
Last active August 29, 2015 14:11 — forked from steinim/human_log.py
This is special variant of the human_log.py, to just get output when something changed.
@czunker
czunker / gist:32d07ced04928d89d527
Last active October 19, 2015 14:36
Call Puppet Agent inside Ansible playbook
- name: Start puppet agent
sudo: yes
shell: /usr/bin/puppet agent --verbose --test
register: puppet_agent_result
changed_when: puppet_agent_result.rc|int == 2
failed_when: puppet_agent_result.rc|int != 2 and puppet_agent_result.rc|int != 0
@czunker
czunker / gist:d6ae14c1c324e6c26cb8
Created August 15, 2014 12:05
Create Ansible dynamic inventory from Puppet CA
#!/bin/bash
/usr/bin/puppet cert list --all > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo "Puppet error"
exit 1
fi
HOSTS="{\n\t\"all\":\n\t\t[\n"