ansible não pode baixar o git repo on centos 7

1

Eu tenho isso em meus papéis drupal para baixar o drupal git

---

- name: Install git
  yum: name=git state=latest

- name: Clone Drupal
  git: repo=http://git.drupal.org/project/drupal.git
       dest=/var/www/html/drupal/
       update=no

- name: Create settings.php
  command: cp /var/www/html/drupal/sites/default/default.settings.php /var/www/html/drupal/sites/default/settings.php

- name: Create services.yml
  command: cp /var/www/html/drupal/sites/default/default.services.yml /var/www/html/drupal/sites/default/services.yml

- name: Update permissions of settings.php
  file: path=/var/www/html/drupal/sites/default/settings.php mode=777

- name: Update permissions of services.yml
  file: path=/var/www/html/drupal/sites/default/services.yml mode=777

- name: Update permissions of files directory
  file: >
    path=/var/www/html/drupal/sites/default/files
    mode=777
    state=directory
    recurse=yes

e quando eu corro ansible aqui está o erro que recebo

TASK: [drupal | Clone Drupal] *************************************************
changed: [ansiblev1]

TASK: [drupal | Create settings.php] ******************************************
failed: [ansiblev1] => {"changed": true, "cmd": ["cp", "/var/www/html/drupal/sites/default/default.settings.php", "/var/www/html/drupal/sites/default/settings.php"], "delta": "0:00:00.004656", "end": "2015-02-04 23:27:12.815990", "rc": 1, "start": "2015-02-04 23:27:12.811334", "warnings": []}
stderr: cp: cannot stat '/var/www/html/drupal/sites/default/default.settings.php': No such file or directory

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/home/bbusari/site.retry

ansiblev1                  : ok=22   changed=1    unreachable=0    failed=1

quando eu verifiquei o servidor para ver se o drupal git foi descarregado, não havia nada lá.

Como faço para usar o módulo git para fazer o download no centos 7? Obrigado

    
por grant tailor 05.02.2015 / 05:33

1 resposta

3

Bem, siga as faixas ...

Primeiro indício:

$ wget http://git.drupal.org/project/drupal.git
--2015-02-05 00:06:57--  http://git.drupal.org/project/drupal.git
Resolving git.drupal.org... 140.211.10.6
Connecting to git.drupal.org|140.211.10.6|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-02-05 00:06:58 ERROR 404: Not Found.

OK, você tem um URL de repo errado. Vamos ver mais:

$ curl http://git.drupal.org/
Drupal.org does not provide repository listings in gitweb. You must access repositories directly by fully-qualified URI - e.g. for Drupal core, http://drupalcode.org/project/drupal.git . If you want a listing of repositories, consult the listings of projects on Drupal.org itself.

Agora estamos chegando a algum lugar. Vamos para essa página! O que vemos na parte inferior da página?

Clone
git://git.drupal.org/project/drupal.git

Então, é a URL que você deve usar em seu ansitivo jogo de módulo git.

    
por 05.02.2015 / 07:13