Skip to content

cannot specify more than one of content, source, target in init.pp #65

@7yl4r

Description

@7yl4r

I am looking to use this to set vm.swappiness so my setup is very simple.

Heira:

sysctl::base::values:
    vm.swappiness:
        ensure: '0'

class declaration:

	include sysctl::base

The error:

puppet agent -t
Info: Using configured environment 'test'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for test-node.marine.usf.edu
Error: Failed to apply catalog: Validation of File[/etc/sysctl.d/vm.swappiness.conf] failed: You cannot specify more than one of content, source, target at /etc/puppetlabs/code/environments/test/modules/sysctl/manifests/init.pp:57

Does the file resource declaration at L57 need to be updated? Or maybe there is some issue with default values? It looks to me like the defaults are set to undef though I don't see what the issue is.


env details:

# master:
[root@puppetmaster ]# puppet --version
4.10.11

# node:
[root@test-node ~]# puppet --version
4.10.0
[root@imars-airflow11 ~]# cat /etc/*elease
CentOS Linux release 7.3.1611 (Core) 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.3.1611 (Core) 
CentOS Linux release 7.3.1611 (Core) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions