diff --git a/examples/facts.pp b/examples/facts.pp index 8cf7b247..18ee222e 100644 --- a/examples/facts.pp +++ b/examples/facts.pp @@ -1,23 +1,23 @@ -if $::cassandrarelease { - notify { "Cassandra release: ${::cassandrarelease}": } +if $facts['cassandrarelease'] { + notify { "Cassandra release: ${facts['cassandrarelease']}": } } else { - warning('::cassandrarelease is not set!') + warning('fact cassandrarelease is not set!') } -if $::cassandramajorversion { - notify { "Cassandra major version: ${::cassandramajorversion}": } +if $facts['cassandramajorversion'] { + notify { "Cassandra major version: ${facts['cassandramajorversion']}": } } else { - warning('::cassandramajorversion is not set!') + warning('fact cassandramajorversion is not set!') } -if $::cassandraminorversion { - notify { "Cassandra minor version: ${::cassandraminorversion}": } +if $facts['cassandraminorversion'] { + notify { "Cassandra minor version: ${facts['cassandraminorversion']}": } } else { - warning('::cassandraminorversion is not set!') + warning('fact cassandraminorversion is not set!') } -if $::cassandrapatchversion { - notify { "Cassandra patch version: ${::cassandrapatchversion}": } +if $facts['cassandrapatchversion'] { + notify { "Cassandra patch version: ${facts['cassandrapatchversion']}": } } else { - warning('::cassandrapatchversion is not set!') + warning('fact cassandrapatchversion is not set!') } diff --git a/manifests/schema/user.pp b/manifests/schema/user.pp index 82339612..f6b18759 100644 --- a/manifests/schema/user.pp +++ b/manifests/schema/user.pp @@ -33,8 +33,8 @@ $quote = '"' } - if $::cassandrarelease != undef { - if versioncmp($::cassandrarelease, '2.2') < 0 { + if $facts['cassandrarelease'] { + if versioncmp($facts['cassandrarelease'], '2.2') < 0 { $operate_with_roles = false } else { $operate_with_roles = true