Instantly share code, notes, and snippets.

All my code is public.

Lukáš Zapletal lzap

View GitHub Profile
View kexec-append-fix.erb
<%#
kind: kexec
name: Discovery Red Hat kexec
oses:
- CentOS 4
- CentOS 5
- CentOS 6
- CentOS 7
- Fedora 21
- Fedora 22
View gist:5d06d56e9712a73f0287f2f1ccb2082f
[root@rc ~]# foreman-installer -v --scenario foreman --puppet-runmode none --foreman-organizations-enabled true --foreman-initial-organization=MyOrg --foreman-locations-enabled true --foreman-initial-location=MyLoc --enable-foreman-plugin-discovery --enable-foreman-plugin-bootdisk --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-ssh --enable-foreman-plugin-openscap --enable-foreman-proxy-plugin-openscap --foreman-proxy-http=true --foreman-proxy-dns true --foreman-proxy-dns-interface --foreman-proxy-dns-forwarders 192.168.199.1 --foreman-proxy-dns-zone nat.lan --foreman-proxy-dns-reverse 199.168.192.in-addr.arpa --foreman-proxy-dhcp true --foreman-proxy-dhcp-interface --foreman-proxy-dhcp-gateway=192.168.199.1 '--foreman-proxy-dhcp-range=192.168.199.10 192.168.199.109' --foreman-proxy-dhcp-nameservers=192.168.199.4 --foreman-proxy-tftp true --foreman-proxy-tftp-servername=192.168.199.4 --foreman-proxy-puppet true --foreman-proxy-puppetca true --foreman-proxy-templates tru
View v2_features.json
{
"discovery": {
"http_enabled": true,
"https_enabled": true,
"state": "running"
},
"discovery_image": {
"http_enabled": true,
"https_enabled": true,
"state": "running"
View candlepin.xml
<appender name="SyslogAppender" class="ch.qos.logback.classic.net.SyslogAppender">
<syslogHost>localhost</syslogHost>
<facility>DAEMON</facility>
<suffixPattern>candlepin @cee:{"message":"%m","level":"%p","candlepin":{"logger":"%logger","thread":"%thread","request_type":"%X{requestType}","request_uuid":"%X{requestUuid}" },"foreman":{"request":"%X{csid}","org_name":"%X{org}" } }%n</suffixPattern>
</appender>
View gist:1f22ed72dcf3799eb4dd72eca9762c89
[lzap@box foreman-ansible-modules]$ ansible-playbook -vvv test.yaml
ansible-playbook 2.7.4
config file = /home/lzap/work/foreman-ansible-modules/ansible.cfg
configured module search path = ['/home/lzap/work/foreman-ansible-modules/modules']
ansible python module location = /usr/lib/python3.7/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 3.7.1 (default, Nov 23 2018, 10:01:49) [GCC 8.2.1 20181105 (Red Hat 8.2.1-5)]
Using /home/lzap/work/foreman-ansible-modules/ansible.cfg as config file
/home/lzap/work/foreman-ansible-modules/test/inventory/hosts did not meet host_list requirements, check plugin documentation if this is unexpected
/home/lzap/work/foreman-ansible-modules/test/inventory/hosts did not meet script requirements, check plugin documentation if this is unexpected
View oneshot-example.service
[Unit]
Description=My service
[Service]
Type=oneshot
ExecStart=/path/to/my/script.sh
#RemainAfterExit=true
[Install]
WantedBy=multi-user.target
View Ruby Foreman.sublime-build.json
{
"selector": "source.ruby",
"working_dir": "/home/lzap/work/foreman",
"cmd": [
"bundle", "exec", "rake", "test"
],
"variants": [
{
"name": "Run a single test",
"cmd": [
View ipxe_hack_sat62b.diff
diff --git a/modules/dhcp_isc/dhcp_isc_main.rb b/modules/dhcp_isc/dhcp_isc_main.rb
index 1ffb5d3..466e157 100644
--- a/modules/dhcp_isc/dhcp_isc_main.rb
+++ b/modules/dhcp_isc/dhcp_isc_main.rb
@@ -59,7 +59,7 @@ module Proxy::DHCP::ISC
options = record.options
# TODO: Extract this block into a generic dhcp options helper
statements = []
- statements << "filename = \\\"#{options[:filename]}\\\";" if options[:filename]
+ #statements << "filename = \\\"#{options[:filename]}\\\";" if options[:filename]
View ipxe_hack_sat62.diff
diff --git a/app/models/operatingsystem.rb b/app/models/operatingsystem.rb
index 0a308208c..29229390a 100644
--- a/app/models/operatingsystem.rb
+++ b/app/models/operatingsystem.rb
@@ -212,7 +212,7 @@ class Operatingsystem < ActiveRecord::Base
#handle things like gpxelinux/ gpxe / pxelinux here
def boot_filename(host = nil)
- "pxelinux.0"
+ ""
View foreman-elastic.asciidoc

Exported Fields

These are the fields exported by the logging system and available for searching from Elasticsearch and Kibana. Use the full, dotted field name when searching.