Difference between revisions of "Puppet: Useful commands"

From Define Wiki
Jump to navigation Jump to search
(Created page with "== File == <syntaxhighlight> </syntaxhighlight> == User == <syntaxhighlight> user {"teamcity": name => teamcity, ensure => present, shell => "/bin/bash", home => "/hom...")
 
 
Line 1: Line 1:
 
== File ==
 
== File ==
 
<syntaxhighlight>
 
<syntaxhighlight>
 +
    file { "/opt/apache-maven-3.2.5-bin.tar.gz":
 +
        owner => 'root',
 +
        group => 'root',
 +
        mode  => '0440',
 +
        source => "puppet:///modules/apache/apache-maven-3.2.5-bin.tar.gz"
 +
        }
 +
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Latest revision as of 15:07, 11 March 2015

File

    file { "/opt/apache-maven-3.2.5-bin.tar.gz":
        owner => 'root',
        group => 'root',
        mode  => '0440',
        source => "puppet:///modules/apache/apache-maven-3.2.5-bin.tar.gz"
        }

User

        user {"teamcity":
        name => teamcity,
        ensure => present,
        shell => "/bin/bash",
        home => "/home/teamcity",
        managehome => true,
        }

Package

    package{ "java-1.8.0-openjdk":
        ensure => installed,
    }

Exec

        exec{ "keyscan2":
        user => teamcity,
        command => "/usr/bin/ssh-keyscan -p 7999 dvcs"
        }