Skip to content

Instantly share code, notes, and snippets.

View michaeltchapman's full-sized avatar

Michael Chapman michaeltchapman

View GitHub Profile
---
:backends:
- yaml
:yaml:
:datadir: /etc/puppet/data/hiera_data
:hierarchy:
- "hostname/%{hostname}"
- "client/%{clientcert}"
- user
- "user.%{scenario}"
define galera::validate(
$user,
$password,
$host,
$retries = 10,
$delay = 10,
$action = 'select user,host from mysql.user;'
$catch = 'ERROR'
)
{
class openstacklib::openstack::regions(
$regions_hash,
$keystone_user_pw,
$nova_user_pw,
$neutron_user_pw,
$glance_user_pw,
$heat_user_pw,
$cinder_user_pw,
$ceilometer_user_pw
$admin_email = 'openstack@localhost',
[root@control1 ~]# puppet apply testing.pp
Notice: Compiled catalog for control1.domain.name in environment production in 1.07 seconds
Notice: /Stage[main]/Openstacklib::Openstack::Regions/Openstacklib::Openstack::Region_auth[RegionOne]/Openstacklib::Openstack::Service_auth[RegionOne/cinder]/Keystone_service[cinder]/ensure: created
Notice: /Stage[main]/Openstacklib::Openstack::Regions/Openstacklib::Openstack::Region_auth[RegionOne]/Openstacklib::Openstack::Service_auth[RegionOne/cinder]/Keystone_endpoint[RegionOne/cinder]/ensure: created
Notice: /Stage[main]/Openstacklib::Openstack::Regions/Openstacklib::Openstack::Region_auth[shared]/Openstacklib::Openstack::Service_auth[shared/cinder]/Keystone_endpoint[shared/cinder]/ensure: created
Notice: /Stage[main]/Openstacklib::Openstack::Regions/Openstacklib::Openstack::Region_auth[RegionOne]/Openstacklib::Openstack::Service_auth[RegionOne/neutron]/Keystone_service[neutron]/ensure: created
Notice: /Stage[main]/Openstacklib::Openstack::Regions/Openstacklib::Openstack:
[root@localhost ~]# puppet apply test.pp
Notice: Scope(Backends[volume]): ceph2 lvm1 ceph1
Notice: Compiled catalog for localhost.localdomain.domain.name in environment production in 0.03 seconds
Notice: Finished catalog run in 0.05 seconds
[root@control1 ~]# puppet apply test.pp
Notice: Compiled catalog for control1.domain.name in environment production in 0.09 seconds
Notice: /Stage[main]/Main/Nova_aggregate[test_agg]/ensure: created
Notice: Finished catalog run in 3.08 seconds
[root@control1 ~]# nova aggregate-remove-host test_agg compute1
Host compute1 has been successfully removed from aggregate 3
+----+----------+-------------------+-------+-------------------------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+----------+-------------------+-------+-------------------------+
| 3 | test_agg | - | | 'gpu=False', 'ssd=True' |
apache::vhost { 'blah':
}
if $::osfamily == 'RedHat' {
File<| title == '/var/log/httpd' |> {
owner => 'apache'
group => 'apache'
}
}
@michaeltchapman
michaeltchapman / mirror-dstdomain.conf
Created June 12, 2014 06:42
/etc/squid-deb-proxy/mirror/dstdomain.acl
~
~
1,1 All
# mirror-dstdomain.conf
#
# network destinations that are allowed by this cache
# default ubuntu and ubuntu country archive mirrors
.archive.ubuntu.com
ports.ubuntu.com
Monday:
Tristan: Morning
Kavit: Morning
** redacted **
Tuesday:
Tristan: Morning
Kavit: Morning
# DEPRECATED. The libvirt VIF driver to configure the
# VIFs.This option is deprecated and will be removed in the
# Juno release. (string value)
# Deprecated group;name - DEFAULT;libvirt_vif_driver
#vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver