Beispiel #1
0
    def chef_installed(self):
        knife = "/opt/chef/bin/knife"
        command = "test -x %s" % (pipes.quote(knife))
        version = self.options['version']

        if version:
            command += (" && %s --version | grep %s" %
                        (pipes.quote(knife), pipes.quote('Chef: %s' %
                                                         (version))))

        exit_code = shell.shell_out(command)
        return exit_code == 0
Beispiel #2
0
    def chef_installed(self):
        knife = "/opt/chef/bin/knife"
        command = "test -x %s" % (pipes.quote(knife))
        version = self.options['version']

        if version:
            command += (" && %s --version | grep %s" %
                        (pipes.quote(knife),
                         pipes.quote('Chef: %s' % (version))))

        exit_code = shell.shell_out(command)
        return exit_code == 0
Beispiel #3
0
 def install(self):
     return shell.shell_out(self.build_command(**self.options))
Beispiel #4
0
 def install(self):
     return shell.shell_out(self.build_command(**self.options))