This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@master:~ # puppet agent -t | |
Info: Using configured environment 'production' | |
Info: Retrieving pluginfacts | |
Info: Retrieving plugin | |
Info: Loading facts | |
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Class[Ntp]: | |
parameter 'config_epp' expects a String value, got Hash | |
parameter 'config_template' expects a String value, got Hash | |
parameter 'keys_controlkey' expects a value of type ntp::key_id = Integer[1, 65534] or Pattern[/^\d+$/, //], got Hash[Unit, Unit, 0, 0] | |
parameter 'keys_requestkey' expects a value of type ntp::key_id = Integer[1, 65534] or Pattern[/^\d+$/, //], got Hash[Unit, Unit, 0, 0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install yamledit to be used with ansible to update yaml files | |
# this must be done on your master, infra and node hosts | |
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
yum install -i ./epel-release-latest-7.noarch.rpm | |
yum -y install python-pip | |
pip install ruamel.yaml | |
if [ ! -d yamledit ] | |
then | |
git clone https://github.com/microtodd/yamledit.git | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# commands to be used on the bastion host | |
file=/etc/origin/master/master-config.yaml | |
key=projectConfig.projectRequestMessage | |
value='Please create project using the portal or contact [email protected]' | |
# list entry | |
ansible masters -m command -a "/usr/local/sbin/yamledit -f ${file} -g ${key}" | |
# update entry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[snippets]] | |
description = "Create a .keep file in all empty directories" | |
command = "find . -type d -empty -print0 | xargs -0 -I % touch %/.keep" | |
output = "" | |
[[snippets]] | |
description = "Display all listen port" | |
command = "lsof -Pan -i tcp -i udp" | |
output = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
network-interfaces: | | |
auto lo | |
iface lo inet loopback | |
iface ens3 inet dhcp | |
iface ens4 inet dhcp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jenkins.instance.pluginManager.plugins.each{ | |
plugin -> | |
println ("${plugin.getShortName()}:${plugin.getVersion()}") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!groovy | |
import jenkins.model.* | |
import hudson.model.* | |
import hudson.slaves.* | |
import com.synopsys.arc.jenkinsci.plugins.jobrestrictions.nodes.JobRestrictionProperty; | |
import com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.RegexNameRestriction; | |
import com.synopsys.arc.jenkinsci.plugins.jobrestrictions.util.GroupSelector; | |
// Set nummber of executors | |
def instance = Jenkins.getInstance() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'git' | |
g = Git.open(working_dir) | |
untracked_files = gitstatus_untracked_workaround(g) | |
def gitstatus_untracked_workaround(g) | |
gem_rubygit_buggy_untracked_files = g.status.untracked.keys | |
git_files = `git --work-tree=#{g.dir} --git-dir=#{g.dir}/.git ls-files -z -d -m -o -X .gitignore`.split("\x0") | |
gem_rubygit_buggy_untracked_files & git_files | |
end |
NewerOlder