summaryrefslogtreecommitdiff
path: root/code/environments/production/modules/stdlib/examples
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-09-20 14:49:52 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-09-20 14:49:52 +0200
commit774cf89157a6c5af2566d98607a8b9aa655e33b0 (patch)
treecc7a73cb9e941b0338771653bdc301c80f2e61c7 /code/environments/production/modules/stdlib/examples
parent9513b93a992470e21e387db1451fa4fd21ffc5d6 (diff)
downloadpuppet.OvG-774cf89157a6c5af2566d98607a8b9aa655e33b0.tar.gz
puppet.OvG-774cf89157a6c5af2566d98607a8b9aa655e33b0.tar.bz2
puppet.OvG-774cf89157a6c5af2566d98607a8b9aa655e33b0.zip
Bundle puppetlabs-stdlib 4.25.1.
Diffstat (limited to 'code/environments/production/modules/stdlib/examples')
-rw-r--r--code/environments/production/modules/stdlib/examples/file_line.pp9
-rw-r--r--code/environments/production/modules/stdlib/examples/has_interface_with.pp9
-rw-r--r--code/environments/production/modules/stdlib/examples/has_ip_address.pp3
-rw-r--r--code/environments/production/modules/stdlib/examples/has_ip_network.pp3
-rw-r--r--code/environments/production/modules/stdlib/examples/init.pp1
5 files changed, 25 insertions, 0 deletions
diff --git a/code/environments/production/modules/stdlib/examples/file_line.pp b/code/environments/production/modules/stdlib/examples/file_line.pp
new file mode 100644
index 0000000..e628bea
--- /dev/null
+++ b/code/environments/production/modules/stdlib/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/code/environments/production/modules/stdlib/examples/has_interface_with.pp b/code/environments/production/modules/stdlib/examples/has_interface_with.pp
new file mode 100644
index 0000000..a578dd2
--- /dev/null
+++ b/code/environments/production/modules/stdlib/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/code/environments/production/modules/stdlib/examples/has_ip_address.pp b/code/environments/production/modules/stdlib/examples/has_ip_address.pp
new file mode 100644
index 0000000..594143d
--- /dev/null
+++ b/code/environments/production/modules/stdlib/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/code/environments/production/modules/stdlib/examples/has_ip_network.pp b/code/environments/production/modules/stdlib/examples/has_ip_network.pp
new file mode 100644
index 0000000..1f1130d
--- /dev/null
+++ b/code/environments/production/modules/stdlib/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/code/environments/production/modules/stdlib/examples/init.pp b/code/environments/production/modules/stdlib/examples/init.pp
new file mode 100644
index 0000000..ad27972
--- /dev/null
+++ b/code/environments/production/modules/stdlib/examples/init.pp
@@ -0,0 +1 @@
+include ::stdlib