Skip to content

Instantly share code, notes, and snippets.

Sitting in front of my computer.

Lukáš Zapletal lzap

Sitting in front of my computer.
Block or report user

Report or block lzap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lzap /
Last active Jun 18, 2019
Upstreamization report from 2019-06-18 07:19:39 UTC

Upstreamization report from 2019-06-18 08:24:51 UTC


Line Contents
3 == Building Cloud Images for {ProjectName}
5 Use this section to build and register images to {ProjectName}.
120 .. For the installation source, add an HTTP link to your repository in {ProjectName}, for example ''
215 configuration so that they receive updates from the correct {Project}
216 Server or {SmartProxyServer}.
View test.diff
diff --git a/app/controllers/api/v2/operatingsystems_controller.rb b/app/controllers/api/v2/operatingsystems_controller.rb
index f7f3859f5..5739cd4a2 100644
--- a/app/controllers/api/v2/operatingsystems_controller.rb
+++ b/app/controllers/api/v2/operatingsystems_controller.rb
@@ -100,7 +100,7 @@ module Api
host_mock = @operatingsystem, medium: medium, architecture: arch)
medium_provider =
- render :json => @operatingsystem.pxe_files(medium_provider)
+ render :json => host_mock.pxe_files
lzap / smart-proxy.patch
Created Mar 18, 2019
Grub2 in UEFI is known to have problems with relative paths - this makes Foreman to manage /grub.cfg-01-XXXXX files
View smart-proxy.patch
diff --git a/modules/tftp/server.rb b/modules/tftp/server.rb
index 4cbcff3..810ace9 100644
--- a/modules/tftp/server.rb
+++ b/modules/tftp/server.rb
@@ -98,7 +98,7 @@ module Proxy::TFTP
def pxeconfig_file mac
- ["#{pxeconfig_dir}/grub.cfg-01-"':','-').downcase]
+ ["#{pxeconfig_dir}/grub.cfg-01-"':','-').downcase, "#{pxeconfig_dir}/../grub.cfg-01-"':','-').downcase]
View httpboot_api.rb
class Proxy::HttpbootApi < Sinatra::Base
helpers ::Proxy::Helpers
head "/*" do
file =[:splat].first).cleanpath
root =
joined_path = File.join(root, file)
log_halt(404, "Not found") unless File.exist?(joined_path)
real_file =
log_halt(403, "Invalid or empty path") unless real_file.fnmatch?("#{root}/**")
View kexec-append-fix.erb
kind: kexec
name: Discovery Red Hat kexec
- 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 --foreman-proxy-dns-zone nat.lan --foreman-proxy-dns-reverse --foreman-proxy-dhcp true --foreman-proxy-dhcp-interface --foreman-proxy-dhcp-gateway= '--foreman-proxy-dhcp-range=' --foreman-proxy-dhcp-nameservers= --foreman-proxy-tftp true --foreman-proxy-tftp-servername= --foreman-proxy-puppet true --foreman-proxy-puppetca true --foreman-proxy-templates tru
lzap / v2_features.json
Last active Jan 31, 2019
Foreman Smart Proxy V2 Features
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="">
<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>
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
lzap / oneshot-example.service
Created Oct 17, 2018
Systemd oneshot example service
View oneshot-example.service
Description=My service
You can’t perform that action at this time.