This file contains 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@xyz:/etc/apache2/conf.d# ls -l /etc/foreman/tls | |
total 16 | |
-rw-r--r-- 1 root root 2090 Jan 13 10:27 xyz.crt | |
-rw-r--r-- 1 root root 1675 Jan 13 10:27 xyz.key | |
-rw-r--r-- 1 root root 4474 Jan 13 10:27 ca_bundle.cer | |
root@xyz:/etc/apache2/conf.d# openssl verify -verbose -CAfile /etc/foreman/tls/ca_bundle.cer /etc/foreman/tls/xyz.crt | |
/etc/foreman/tls/xyz.crt: OK | |
root@xyz:/etc/apache2/conf.d# tail foreman.conf -n15 |
This file contains 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
[ INFO 2014-01-14 11:36:49 main] Parsing default values from puppet modules... | |
[DEBUG 2014-01-14 11:36:49 main] echo '$kafo_config_file="/usr/share/foreman-installer/config/foreman-installer.yaml" $kafo_add_progress=true include foreman_proxy::params include puppet::params include foreman::params dump_values(foreman_proxy::params::port,foreman_proxy::params::dhcp_range,foreman_proxy::params::dns_server,foreman_proxy::params::ssl_ca,foreman_proxy::params::ssldir,foreman_proxy::params::tftp_root,foreman_proxy::params::dhcp,foreman_proxy::params::dhcp_vendor,foreman_proxy::params::dhcp_key_secret,foreman_proxy::params::bmc,foreman_proxy::params::use_sudoersd,foreman_proxy::params::tftp,foreman_proxy::params::dns_managed,foreman_proxy::params::custom_repo,foreman_proxy::params::user,foreman_proxy::params::ssl,foreman_proxy::params::ssl_key,foreman_proxy::params::tftp_dirs,foreman_proxy::params::dhcp_managed,foreman_proxy::params::trusted_hosts,foreman_proxy::params::puppetca,foreman_proxy::params::puppetca_cmd,f |
This file contains 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
# puppet agent -t | |
Info: Retrieving plugin | |
Info: Loading facts in /var/lib/puppet/lib/facter/vmwaretools_version.rb | |
Info: Loading facts in /var/lib/puppet/lib/facter/esx_version.rb | |
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb | |
Info: Loading facts in /var/lib/puppet/lib/facter/rabbitmq_erlang_cookie.rb | |
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb | |
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb | |
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb | |
Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb |
This file contains 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 'mcollective' | |
mc = MCollective::Client.new('/etc/mcollective/server.cfg') | |
mc.discover('/.*/', 60) | |
mc.disconnect | |
# $ ruby helloworld.rb | |
# /usr/lib/ruby/1.8/mcollective/discovery.rb:24:in `discovery_method': undefined method `[]' for nil:NilClass (NoMethodError) | |
# from /usr/lib/ruby/1.8/mcollective/discovery.rb:84:in `force_discovery_method_by_filter' |
This file contains 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
$ python rita.py | |
debug: contentpath: /Users/someuser/.rita/content/ | |
debug: raw content: [('/Users/someuser/.rita/content/', ['pages'], ['helloworld.md', 'index.md']), ('/Users/someuser/.rita/content/pages', [], ['aboutme.md'])] | |
debug: process_content() | |
debug: content: [] |
This file contains 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
import requests, shlex, json | |
from subprocess import Popen, PIPE | |
class MCollective: | |
def list_hosts(self): | |
process = Popen(shlex.split("mco rpc rpcutil ping -j"), stdout=PIPE) | |
j = process.communicate()[0] | |
process.wait() |
This file contains 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
ImmutableMultiDict([('active', u'on'), ('site', u'1'), ('enhanced', u'on'), ('vlanid', u'13')]) | |
Subnets: False | |
Sites: [<Site A9 (True)>] | |
Active: True | |
Enhanced: True | |
127.0.0.1 - - [24/Jan/2014 10:52:28] "POST /vlans/add HTTP/1.1" 302 - | |
ImmutableMultiDict([('active', u'on'), ('vlanid', u'13'), ('enhanced', u'on')]) |
This file contains 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
Traceback (most recent call last): | |
File "/home/mcrilly/Documents/Git/vs-vlan-db/venv/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__ | |
return self.wsgi_app(environ, start_response) | |
File "/home/mcrilly/Documents/Git/vs-vlan-db/venv/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app | |
response = self.make_response(self.handle_exception(e)) | |
File "/home/mcrilly/Documents/Git/vs-vlan-db/venv/lib/python2.7/site-packages/flask_restful/__init__.py", line 258, in error_router | |
return original_handler(e) | |
File "/home/mcrilly/Documents/Git/vs-vlan-db/venv/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception | |
reraise(exc_type, exc_value, tb) | |
File "/home/mcrilly/Documents/Git/vs-vlan-db/venv/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app |
This file contains 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
import sys | |
from ipaddress import IPv4Network, IPv4Address | |
def error_banned(ip_addr): | |
print "That's a banned IP: {}".format(str(ip_addr)) | |
def error_private(ip_addr): | |
print "That IP is in a private range: {}".format(str(ip_addr)) |
This file contains 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
# Works... | |
@app.route('/subnets/add', methods=['GET', 'POST']) | |
def subnets_add(): | |
form = subnet.SubnetFormv2() | |
data = helpers.top_ten() | |
if form.validate_on_submit(): | |
form.populate_obj(Subnet) | |
dbo.session.commit() |
OlderNewer