On vr, 2010-07-02 at 07:08 -0700, PieterB wrote:
>
> On Jul 2, 3:57 pm, Dennis Kaarsemaker <[email protected]> wrote:
> > On vr, 2010-07-02 at 06:42 -0700, PieterB wrote:
>
> > puppet using django as well.
>
> Without going into detail, how have you made the coupling between the
> two
Servers are represented by a django model with a couple of attributes
such as status (manually defined/imported), os (set on import),
architecture (likewise) and roles. The latter is an m2m to a ServerRole
class. One of its fields is puppet_roles, which is a comma separated
string of roles. Servers also have a puppet_settings field where one can
finetune. We use that for things like:
$ldap = 0 # no ldap authentication
$sox = 1 # in SOX scope
The actual link to puppet is simple. It has two parts: part one is a a
view and a template to generate nodes.pp. This is the template. servers
is a list of (fqdn, status, settings, classes) base::common is the "this
is a generic machine with no specified role" class that sets up MTA,
snmp, nrpe, ntp etc...
{% for node in servers %}node "{{ node.0 }}" {
$sdb_status="{{ node.1 }}"
{% if node.2 %}{{ node.2|indent:"4" }}
{% endif %} include {{
node.3|default:"base::common"|split:","|quoted|join:"," }}
}
{% endfor %}{% endautoescape %}
The second part is a cronjob that updates nodes.pp and signs incoming
certificate requests from known machines. This runs on all
puppetmasters.
--
Dennis K.
They've gone to plaid!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.