Beef up the example inventory
Signed-off-by: martin f. krafft <madduck@madduck.net>
diff --git a/examples/classes/debian/init.yml b/examples/classes/debian/init.yml
new file mode 100644
index 0000000..ca77e9f
--- /dev/null
+++ b/examples/classes/debian/init.yml
@@ -0,0 +1,46 @@
+applications:
+ - apt
+ - locales
+parameters:
+ debian_stable_suite: wheezy
+ apt:
+ repo_uri: http://http.debian.net/debian
+ repo_uri_security: http://security.debian.org/debian-security
+ default_components: main # TODO: pass as a list!
+ include_sources: no
+ include_security: yes
+ include_updates: yes
+ include_proposed_updates: no
+ disable_sources_dir: no
+ disable_preferences_dir: no
+ acquire_pdiffs: no
+ install_recommends: no
+ cache_limit: 67108864
+ apt_repos:
+ - id: debian
+ enabled: yes
+ uri: ${apt:repo_uri}
+ components: ${apt:default_components}
+ sources: ${apt:include_sources}
+ - id: debian-security
+ enabled: ${apt:include_security}
+ uri: ${apt:repo_uri_security}
+ suite_postfix: /updates
+ components: ${apt:default_components}
+ sources: ${apt:include_sources}
+ - id: debian-updates
+ enabled: ${apt:include_updates}
+ suite_postfix: -updates
+ uri: ${apt:repo_uri}
+ components: ${apt:default_components}
+ sources: ${apt:include_sources}
+ - id: debian-proposed-updates
+ enabled: ${apt:include_proposed_updates}
+ uri: ${apt:repo_uri}
+ suite_postfix: -proposed-updates
+ components: ${apt:default_components}
+ sources: ${apt:include_sources}
+ locales:
+ list:
+ - en_NZ.UTF-8 UTF-8
+ - de_CH.UTF-8 UTF-8
diff --git a/examples/classes/debian/release/jessie.yml b/examples/classes/debian/release/jessie.yml
new file mode 100644
index 0000000..30d3a09
--- /dev/null
+++ b/examples/classes/debian/release/jessie.yml
@@ -0,0 +1,4 @@
+classes:
+ - debian.suite.testing
+parameters:
+ debian_codename: jessie
diff --git a/examples/classes/debian/release/lenny.yml b/examples/classes/debian/release/lenny.yml
new file mode 100644
index 0000000..0d14dfa
--- /dev/null
+++ b/examples/classes/debian/release/lenny.yml
@@ -0,0 +1,4 @@
+classes:
+ - debian.suite.archived
+parameters:
+ debian_codename: lenny
diff --git a/examples/classes/debian/release/sid.yml b/examples/classes/debian/release/sid.yml
new file mode 100644
index 0000000..ee58537
--- /dev/null
+++ b/examples/classes/debian/release/sid.yml
@@ -0,0 +1,4 @@
+classes:
+ - debian.suite.unstable
+parameters:
+ debian_codename: sid
diff --git a/examples/classes/debian/release/squeeze.yml b/examples/classes/debian/release/squeeze.yml
new file mode 100644
index 0000000..3983c5b
--- /dev/null
+++ b/examples/classes/debian/release/squeeze.yml
@@ -0,0 +1,4 @@
+classes:
+ - debian.suite.oldstable
+parameters:
+ debian_codename: squeeze
diff --git a/examples/classes/debian/release/wheezy.yml b/examples/classes/debian/release/wheezy.yml
new file mode 100644
index 0000000..01e0c7e
--- /dev/null
+++ b/examples/classes/debian/release/wheezy.yml
@@ -0,0 +1,4 @@
+classes:
+ - debian.suite.stable
+parameters:
+ debian_codename: wheezy
diff --git a/examples/classes/debian/suite/archived.yml b/examples/classes/debian/suite/archived.yml
new file mode 100644
index 0000000..8ba90c8
--- /dev/null
+++ b/examples/classes/debian/suite/archived.yml
@@ -0,0 +1,15 @@
+classes:
+ - debian
+parameters:
+ debian_suite: archived
+ apt:
+ repo_uri: http://archive.debian.org/debian
+ repo_uri_security: http://archive.debian.org/debian-security
+ repo_uri_backports: http://archive.debian.org/debian-backports
+ repo_uri_volatile: http://archive.debian.org/debian-volatile
+ include_security: no
+ include_updates: no
+ include_proposed_updates: no
+ motd:
+ newsitems:
+ - This host is no longer kept up-to-date and will be decomissioned soon.
diff --git a/examples/classes/debian/suite/include_backports.yml b/examples/classes/debian/suite/include_backports.yml
new file mode 100644
index 0000000..13d1d96
--- /dev/null
+++ b/examples/classes/debian/suite/include_backports.yml
@@ -0,0 +1,13 @@
+classes:
+ - debian
+parameters:
+ apt:
+ repo_uri_backports: http://http.debian.net/debian
+ include_backports: yes
+ apt_repos:
+ - id: debian-backports
+ enabled: ${apt:include_backports}
+ uri: ${apt:repo_uri_backports}
+ suite_postfix: -backports
+ components: ${apt:default_components}
+ sources: ${apt:include_sources}
diff --git a/examples/classes/debian/suite/include_experimental.yml b/examples/classes/debian/suite/include_experimental.yml
new file mode 100644
index 0000000..3311d7f
--- /dev/null
+++ b/examples/classes/debian/suite/include_experimental.yml
@@ -0,0 +1,13 @@
+classes:
+ - debian
+parameters:
+ apt:
+ repo_uri_experimental: ${apt:repo_uri}
+ include_experimental: yes
+ apt_repos:
+ - id: debian-experimental
+ enabled: ${apt:include_experimental}
+ uri: ${apt:repo_uri_experimental}
+ suite: experimental
+ components: ${apt:default_components}
+ sources: ${apt:include_sources}
diff --git a/examples/classes/debian/suite/include_multimedia.yml b/examples/classes/debian/suite/include_multimedia.yml
new file mode 100644
index 0000000..ad1990d
--- /dev/null
+++ b/examples/classes/debian/suite/include_multimedia.yml
@@ -0,0 +1,12 @@
+classes:
+ - debian
+parameters:
+ apt:
+ repo_uri_multimedia: http://deb-multimedia.org
+ include_multimedia: yes
+ apt_repos:
+ - id: debian-multimedia
+ enabled: ${apt:include_multimedia}
+ uri: ${apt:repo_uri_multimedia}
+ components: ${apt:default_components}
+ sources: ${apt:include_sources}
diff --git a/examples/classes/debian/suite/include_volatile.yml b/examples/classes/debian/suite/include_volatile.yml
new file mode 100644
index 0000000..c30843b
--- /dev/null
+++ b/examples/classes/debian/suite/include_volatile.yml
@@ -0,0 +1,18 @@
+classes:
+ - debian
+parameters:
+ apt:
+ repo_uri_volatile: ${repo_uri}-volatile
+ include_volatile: True
+ include_volatile_sloppy: False
+ apt_repos:
+ - id: debian-volatile
+ enabled: ${apt:include_volatile}
+ uri: ${apt:repo_uri_volatile}
+ components: ${apt:default_components}
+ sources: ${apt:include_sources}
+ - id: debian-volatile-sloppy
+ enabled: ${apt:include_volatile_sloppy}
+ uri: ${apt:repo_uri_volatile}-sloppy
+ components: ${apt:default_components}
+ sources: ${apt:include_sources}
diff --git a/examples/classes/debian/suite/oldstable.yml b/examples/classes/debian/suite/oldstable.yml
new file mode 100644
index 0000000..3464554
--- /dev/null
+++ b/examples/classes/debian/suite/oldstable.yml
@@ -0,0 +1,8 @@
+classes:
+ - debian
+parameters:
+ debian_suite: oldstable
+ apt:
+ include_security: yes
+ include_updates: no
+ include_proposed_updates: no
diff --git a/examples/classes/debian/suite/stable.yml b/examples/classes/debian/suite/stable.yml
new file mode 100644
index 0000000..520d559
--- /dev/null
+++ b/examples/classes/debian/suite/stable.yml
@@ -0,0 +1,8 @@
+classes:
+ - debian
+parameters:
+ debian_suite: stable
+ apt:
+ include_security: yes
+ include_updates: yes
+ include_proposed_updates: no
diff --git a/examples/classes/debian/suite/testing.yml b/examples/classes/debian/suite/testing.yml
new file mode 100644
index 0000000..a438591
--- /dev/null
+++ b/examples/classes/debian/suite/testing.yml
@@ -0,0 +1,8 @@
+classes:
+ - debian
+parameters:
+ debian_suite: testing
+ apt:
+ include_security: yes
+ include_updates: no
+ include_proposed_updates: no
diff --git a/examples/classes/debian/suite/unstable.yml b/examples/classes/debian/suite/unstable.yml
new file mode 100644
index 0000000..2441ca8
--- /dev/null
+++ b/examples/classes/debian/suite/unstable.yml
@@ -0,0 +1,8 @@
+classes:
+ - debian
+parameters:
+ debian_suite: unstable
+ apt:
+ include_security: no
+ include_updates: no
+ include_proposed_updates: no
diff --git a/examples/classes/example.org.yml b/examples/classes/example.org.yml
new file mode 100644
index 0000000..0363661
--- /dev/null
+++ b/examples/classes/example.org.yml
@@ -0,0 +1,12 @@
+classes:
+ - sudo # all nodes in the example.org domain provide sudo
+applications:
+ - motd # all nodes in the example.org domain are expected to provide /etc/motd
+parameters:
+ motd:
+ legalese: This system is for authorized users only. All traffic on this
+ device is monitored and will be used as evidence if necessary. Use your
+ brain.
+ support: "Please write a message to <${local_admin:email}> in case of problems."
+ location: "Rack ${location:rack}, ${location:address}"
+ tagline: "My hostname's RGB colour code is ${rgb_colour_code}."
diff --git a/examples/classes/hosted@munich.yml b/examples/classes/hosted@munich.yml
new file mode 100644
index 0000000..72f14e8
--- /dev/null
+++ b/examples/classes/hosted@munich.yml
@@ -0,0 +1,6 @@
+parameters:
+ location:
+ address: Briennerstrasse 32, 80333 Munich
+ rack: 2.64
+ local_admin:
+ email: local-admins@munich.example.org
diff --git a/examples/classes/hosted@zurich.yml b/examples/classes/hosted@zurich.yml
new file mode 100644
index 0000000..2ab23a4
--- /dev/null
+++ b/examples/classes/hosted@zurich.yml
@@ -0,0 +1,6 @@
+parameters:
+ location:
+ address: Letzigraben 4, 8004 Zurich
+ rack: C/IV 6.43
+ local_admin:
+ email: local-admins@zurich.example.org
diff --git a/examples/classes/mail/init.yml b/examples/classes/mail/init.yml
new file mode 100644
index 0000000..8751beb
--- /dev/null
+++ b/examples/classes/mail/init.yml
@@ -0,0 +1,2 @@
+applications:
+ - postfix
diff --git a/examples/classes/mail/relay.yml b/examples/classes/mail/relay.yml
new file mode 100644
index 0000000..28d3b26
--- /dev/null
+++ b/examples/classes/mail/relay.yml
@@ -0,0 +1,6 @@
+classes:
+ - mail
+parameters:
+ mail:
+ role: relay
+ port: 587
diff --git a/examples/classes/mail/satellite.yml b/examples/classes/mail/satellite.yml
new file mode 100644
index 0000000..8a27c92
--- /dev/null
+++ b/examples/classes/mail/satellite.yml
@@ -0,0 +1,8 @@
+classes:
+ - mail
+parameters:
+ mail:
+ role: satellite
+ smtp_relay: smtp.example.org:587
+ smtp_relay_fingerprint: 45:88:ff:11:b0:be:39:c8:30:2a:84:bd:fc:6c:52:ff:76:d4:c5:41
+ tls: enforce
diff --git a/examples/classes/mail/server.yml b/examples/classes/mail/server.yml
new file mode 100644
index 0000000..5e0064d
--- /dev/null
+++ b/examples/classes/mail/server.yml
@@ -0,0 +1,5 @@
+classes:
+ - mail
+parameters:
+ mail:
+ role: server
diff --git a/examples/classes/mysite.yml b/examples/classes/mysite.yml
deleted file mode 100644
index c265615..0000000
--- a/examples/classes/mysite.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-applications:
- - test
-parameters:
- realm: mysite
- greeting: Servus!
diff --git a/examples/classes/node/index.yml b/examples/classes/node/index.yml
deleted file mode 100644
index 2a6987d..0000000
--- a/examples/classes/node/index.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-parameters:
- inventory_db: reclass
diff --git a/examples/classes/node/unix.yml b/examples/classes/node/unix.yml
deleted file mode 100644
index 12bbac1..0000000
--- a/examples/classes/node/unix.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-classes:
- - node
-applications:
- - motd
-parameters:
- greeting: Hello, world!
diff --git a/examples/classes/salt.minion.yml b/examples/classes/salt.minion.yml
new file mode 100644
index 0000000..eccfa34
--- /dev/null
+++ b/examples/classes/salt.minion.yml
@@ -0,0 +1,6 @@
+applications:
+ - salt_minion
+parameters:
+ salt_minion:
+ master: salt-master.example.org
+ master_fingerprint: ed:38:43:88:4b:2d:22:04:76:60:95:18:2e:cd:cf:bf:cc:63:20:c9
diff --git a/examples/classes/sudo.yml b/examples/classes/sudo.yml
new file mode 100644
index 0000000..8a95ccf
--- /dev/null
+++ b/examples/classes/sudo.yml
@@ -0,0 +1,13 @@
+applications:
+ - sudo
+parameters:
+ sudo:
+ opt_lecture: false
+ opt_ignore_dot: true
+ opt_listpw: true
+ opt_insults: true
+ opt_requiretty: true
+ opt_tty_tickets: true
+ opt_passwd_tries: 1
+ opt_secure_path: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+ no_passwd_group: wheel
diff --git a/examples/classes/webserver.yml b/examples/classes/webserver.yml
new file mode 100644
index 0000000..4284d57
--- /dev/null
+++ b/examples/classes/webserver.yml
@@ -0,0 +1,2 @@
+applications:
+ - apache