From cac94245ea5ba150883001d9bd32d8a011080b84 Mon Sep 17 00:00:00 2001 From: yumaojun <719118794@qq.com> Date: Sat, 27 Feb 2016 18:35:00 +0800 Subject: [PATCH] =?UTF-8?q?fix=20(install.py):=20=E3=80=80ubuntu=20=20auto?= =?UTF-8?q?=20install=20mysql-server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. set ansible_api connector as paramiko 2. set ubuntu apt-get --force-yes when install packages --- install/install.py | 2 +- jperm/ansible_api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/install.py b/install/install.py index 82d7bcc7b..cfc7ac4f5 100755 --- a/install/install.py +++ b/install/install.py @@ -191,7 +191,7 @@ class PreSetup(object): if self._is_redhat: bash('yum -y install git python-pip mysql-devel gcc automake autoconf python-devel vim sshpass') if self._is_ubuntu: - bash("apt-get -y install git python-pip gcc automake autoconf vim sshpass libmysqld-dev python-all-dev") + bash("apt-get -y --force-yes install git python-pip gcc automake autoconf vim sshpass libmysqld-dev python-all-dev") @staticmethod diff --git a/jperm/ansible_api.py b/jperm/ansible_api.py index 0b63b48f8..20725908c 100644 --- a/jperm/ansible_api.py +++ b/jperm/ansible_api.py @@ -125,7 +125,7 @@ class MyRunner(MyInventory): self.results_raw = {} def run(self, module_name='shell', module_args='', timeout=10, forks=10, pattern='*', - become=False, become_method='sudo', become_user='root', become_pass='', transport='smart'): + become=False, become_method='sudo', become_user='root', become_pass='', transport='paramiko'): """ run module from andible ad-hoc. module_name: ansible module_name