Esempio n. 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
Esempio n. 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
Esempio n. 3
0
 def install(self):
     return shell.shell_out(self.build_command(**self.options))
Esempio n. 4
0
 def install(self):
     return shell.shell_out(self.build_command(**self.options))