~canonical-ci-engineering/ubuntu-ci-services-itself/ansible

« back to all changes in this revision

Viewing changes to lib/ansible/runner/connection_plugins/fireball.py

  • Committer: Package Import Robot
  • Author(s): Michael Vogt, Harlan Lieberman-Berg, Michael Vogt
  • Date: 2014-03-18 14:33:23 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20140318143323-vahyxk43r88wk49k
Tags: 1.5.3+dfsg-1
[ Harlan Lieberman-Berg ]
* New upstream version.
* Update Ansible homepage URL.
* Add FontAwesome to d/copyright, remove non-existant files.
* Refresh all patches, removing some related to documentation.
* Add new dependency on python-crypto.

[ Michael Vogt ]
* add "sshpass" to Suggests
* add "openssh-client | python-paramiko" to depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    def __init__(self, runner, host, port, *args, **kwargs):
38
38
 
39
39
        self.runner = runner
 
40
        self.has_pipelining = False
40
41
 
41
42
        # attempt to work around shared-memory funness
42
43
        if getattr(self.runner, 'aes_keys', None):
67
68
 
68
69
        return self
69
70
 
70
 
    def exec_command(self, cmd, tmp_path, sudo_user, sudoable=False, executable='/bin/sh'):
 
71
    def exec_command(self, cmd, tmp_path, sudo_user, sudoable=False, executable='/bin/sh', in_data=None, su_user=None, su=None):
71
72
        ''' run a command on the remote host '''
72
73
 
 
74
        if in_data:
 
75
            raise errors.AnsibleError("Internal Error: this module does not support optimized module pipelining")
 
76
 
73
77
        vvv("EXEC COMMAND %s" % cmd)
74
78
 
75
 
        if self.runner.sudo and sudoable:
 
79
        if (self.runner.sudo and sudoable) or (self.runner.su and su):
76
80
            raise errors.AnsibleError(
77
 
                "When using fireball, do not specify sudo to run your tasks. " +
 
81
                "When using fireball, do not specify sudo or su to run your tasks. " +
78
82
                "Instead sudo the fireball action with sudo. " +
79
83
                "Task will communicate with the fireball already running in sudo mode."
80
84
            )