summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2017-01-13 12:41:58 +0100
committervarac <varacanero@zeromail.org>2017-01-13 12:41:58 +0100
commit066c08f8362d53f0f30897cb8710d11260c726ea (patch)
treea6369eecd88bb731fe413d0bbc8af73d74d1f447 /examples
parent71123634744b9fe2ec7d6a3e38e9789fd84801e3 (diff)
parentb65dd1f45d10e10e45455358aeabb29167990e2c (diff)
Merge remote-tracking branch 'origin/master' into leap_master
Diffstat (limited to 'examples')
-rw-r--r--examples/file_line.pp9
-rw-r--r--examples/has_interface_with.pp9
-rw-r--r--examples/has_ip_address.pp3
-rw-r--r--examples/has_ip_network.pp3
-rw-r--r--examples/init.pp1
5 files changed, 25 insertions, 0 deletions
diff --git a/examples/file_line.pp b/examples/file_line.pp
new file mode 100644
index 0000000..85b1325
--- /dev/null
+++ b/examples/file_line.pp
@@ -0,0 +1,9 @@
+# This is a simple smoke test
+# of the file_line resource type.
+file { '/tmp/dansfile':
+ ensure => file,
+} ->
+file_line { 'dans_line':
+ line => 'dan is awesome',
+ path => '/tmp/dansfile',
+}
diff --git a/examples/has_interface_with.pp b/examples/has_interface_with.pp
new file mode 100644
index 0000000..a578dd2
--- /dev/null
+++ b/examples/has_interface_with.pp
@@ -0,0 +1,9 @@
+include ::stdlib
+info('has_interface_with(\'lo\'):', has_interface_with('lo'))
+info('has_interface_with(\'loX\'):', has_interface_with('loX'))
+info('has_interface_with(\'ipaddress\', \'127.0.0.1\'):', has_interface_with('ipaddress', '127.0.0.1'))
+info('has_interface_with(\'ipaddress\', \'127.0.0.100\'):', has_interface_with('ipaddress', '127.0.0.100'))
+info('has_interface_with(\'network\', \'127.0.0.0\'):', has_interface_with('network', '127.0.0.0'))
+info('has_interface_with(\'network\', \'128.0.0.0\'):', has_interface_with('network', '128.0.0.0'))
+info('has_interface_with(\'netmask\', \'255.0.0.0\'):', has_interface_with('netmask', '255.0.0.0'))
+info('has_interface_with(\'netmask\', \'256.0.0.0\'):', has_interface_with('netmask', '256.0.0.0'))
diff --git a/examples/has_ip_address.pp b/examples/has_ip_address.pp
new file mode 100644
index 0000000..594143d
--- /dev/null
+++ b/examples/has_ip_address.pp
@@ -0,0 +1,3 @@
+include ::stdlib
+info('has_ip_address(\'192.168.1.256\'):', has_ip_address('192.168.1.256'))
+info('has_ip_address(\'127.0.0.1\'):', has_ip_address('127.0.0.1'))
diff --git a/examples/has_ip_network.pp b/examples/has_ip_network.pp
new file mode 100644
index 0000000..1f1130d
--- /dev/null
+++ b/examples/has_ip_network.pp
@@ -0,0 +1,3 @@
+include ::stdlib
+info('has_ip_network(\'127.0.0.0\'):', has_ip_network('127.0.0.0'))
+info('has_ip_network(\'128.0.0.0\'):', has_ip_network('128.0.0.0'))
diff --git a/examples/init.pp b/examples/init.pp
new file mode 100644
index 0000000..ad27972
--- /dev/null
+++ b/examples/init.pp
@@ -0,0 +1 @@
+include ::stdlib