# Revision history [back]

I want to make sure I understand you correctly. If /etc/sysctl.conf does not exist, you want to create it. If /etc/sysctl.conf does exist, you want to rewrite the content to match your source. Is that correct?

If so, then you can re-write your requirements to be, "make /etc/sysctl.conf match my source."

file { '/etc/sysctl.conf':
ensure  => present,
owner   => 'root',
group   => 'root',
mode    => '0777',
source  => 'puppet:///vagrant/files/sysctl.conf',
}


You need to make sure your file source is configured in fileserver.conf.

I want to make sure I understand you correctly. If /etc/sysctl.conf does not exist, you want to create it. If /etc/sysctl.conf does exist, you want to rewrite the content to match your source. Is that correct?

If so, then you can re-write your requirements to be, "make /etc/sysctl.conf match my source."

file { '/etc/sysctl.conf':
ensure  => present,
owner   => 'root',
group   => 'root',
mode    => '0777',
source  => 'puppet:///vagrant/files/sysctl.conf',
}


You need to make sure your file source is configured in fileserver.conf.fileserver.conf.

I want to make sure I understand you correctly. If /etc/sysctl.conf does not exist, you want to create it. If /etc/sysctl.conf does exist, you want to rewrite the content to match your source. Is that correct?

If so, then you can re-write your requirements to be, "make /etc/sysctl.conf match my source."

file { '/etc/sysctl.conf':
ensure  => present,
owner   => 'root',
group   => 'root',
mode    => '0777',
source  => 'puppet:///vagrant/files/sysctl.conf',
}


You need to make sure your file source is configured in fileserver.conf.

I want to make sure I understand you correctly. If /etc/sysctl.conf does not exist, you want to create it. If /etc/sysctl.conf does exist, you want to rewrite the content to match your source. Is that correct?

If so, then you can re-write your requirements to be, "make /etc/sysctl.conf match my source."

file { '/etc/sysctl.conf':
ensure  => present,
owner   => 'root',
group   => 'root',
mode    => '0777',
source  => 'puppet:///vagrant/files/sysctl.conf',
}


You need to make sure your file source is configured in fileserver.conf. for the file to be found.

I want to make sure I understand you correctly. If /etc/sysctl.conf does not exist, you want to create it. If /etc/sysctl.conf does exist, you want to rewrite the content to match your source. Is that correct?

If so, then you can re-write your requirements to be, "make /etc/sysctl.conf match my source."

file { '/etc/sysctl.conf':
ensure  => present,
owner   => 'root',
group   => 'root',
mode    => '0777',
source  => 'puppet:///vagrant/files/sysctl.conf',
}


You need to make sure your file source is configured in fileserver.confconfigured in fileserver.conf as a mount point, or in a module, for the file to be found.

I want to make sure I understand you correctly. If /etc/sysctl.conf does not exist, you want to create it. If /etc/sysctl.conf does exist, you want to rewrite the content to match your source. Is that correct?

If so, then you can re-write your requirements to be, "make /etc/sysctl.conf match my source."

file { '/etc/sysctl.conf':
ensure  => present,
owner   => 'root',
group   => 'root',
mode    => '0777',
source  => 'puppet:///vagrant/files/sysctl.conf',
}


You need to make sure your file source is configured configured in fileserver.conf as a mount point, or located in a module, for the file to be found.module.