2014-01-09 53 views
2

對於我可憐的英語,我很抱歉。Ansible和MariaDB。無法通過劇本安裝MariaDB

我被困在安裝MariaDB服務器到流浪機。我有以下幾點:

- name: install mariadb addons 
    apt: pkg=software-properties-common state=latest 
    sudo: yes 

- name: add mariadb key 
    apt_key: url=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xcbcb082a1bb943db 
    sudo: yes 

- name: add mariadb repository 
    apt_repository: repo='deb http://mirror.timeweb.ru/mariadb/repo/10.0/ubuntu precise main' 
    sudo: yes 
    notify: 
    - update repositories 

vagrant provision後,我得到如下:

TASK: [install mariadb addons] ************************************************ 
ok: [192.168.0.3] 

TASK: [add mariadb key] ******************************************************* 
ok: [192.168.0.3] 

TASK: [add mariadb repository] ************************************************ 
failed: [192.168.0.3] => {"failed": true} 
msg: Could not import python modules: pycurl. Please install python-pycurl package. 

FATAL: all hosts have already failed -- aborting 

我做錯了嗎?我如何在不安裝python-pycurl包的情況下安裝mariaDB?

+0

爲什麼你不希望安裝'蟒蛇,pycurl'您ansible劇本文件

- name: install python-pycurl apt: pkg=python-pycurl state=latest sudo: yes 

或者,如果頂部? – Mxx

回答

7

以下內容添加到您已安裝python-pip

- name: install curl-config 
    apt: pkg=libcurl4-openssl-dev state=latest 
    sudo: yes 

- name: install python-pycurl 
    pip: name=pycurl state=latest 
    sudo: yes 
+0

我早就知道了,但是謝謝你的回覆! –