Good afternoon, I need to create a link in the /usr/share/applications/desktop Astra Linux directory from the root user. With the name of the link, the path where it leads and the shortcut. How can this be implemented by puppet manifest? I read the documentation and tried, but nothing came out :(.
class automount_oep_mount_disk_x {
# preferred symlink syn
file { '/usr/share/applications/flydesktop':
ensure => 'file',
name +> 'desktop',
}
Whatever documentation you read must not have been the official Puppet Resource Type Reference. Very near the top of the docs for the File resource type, you will find
(Emphasis added)
The docs for the
ensureattribute that that references say, in part:(Emphasis in the original)
As its name suggests, the
targetattribute designates the target of the symlink (I'll spare you yet another excerpt from the docs).Overall, then, it will look something like this ...
Of course, this describes only the form of the specific manifest code for managing the symlink. The rest of the details of creating classes, classifying nodes, and building and applying catalogs are too many and too diverse for one SO answer.