Пример #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
Пример #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
Пример #3
0
 def install(self):
     return shell.shell_out(self.build_command(**self.options))
Пример #4
0
 def install(self):
     return shell.shell_out(self.build_command(**self.options))