Я использовал ansible для установки экземпляров EC2, я сделал обновление до 1.8, поэтому он может иметь параметр timeout для get_url, и теперь он больше не работает.Ansible больше не работает
У меня есть следующие: securitygroups.yml
---
# Check security group existence, create them if not existing
- name: Create security group for ssh
local_action:
module: ec2_group
name: {{ group_name }}
vpc_id: "{{ vpc_id }}"
description: Security group for ssh
region: "{{ ec2_region }}"
# inbound rules
rules:
- proto: tcp
from_port: xxx
to_port: xxx
cidr_ip: xxx
- proto: tcp
from_port: xxx
to_port: xxx
cidr_ip: xxx
- proto: tcp
from_port: xxx
to_port: xxx
cidr_ip: xxx
# outbound rules
rules_egress:
- proto: all
from_port: xxx
to_port: xxx
cidr_ip: xxx
- name: Authorize the members of this group to push logs to the syslog instance. See the syslog group
local_action:
module: ec2_group
name: logstash-shipper
vpc_id: "{{ vpc_id }}"
description: Authorize the members of this group to push logs to the syslog instance. See the syslog group
region: "{{ ec2_region }}"
# outbound rules
rules_egress:
- proto: tcp
from_port: xxx
to_port: xxx
cidr_ip: xxx
- proto: udp
from_port: xxx
to_port: xxx
cidr_ip: xxx
и в main.yml:
---
# Check security group existence, create them if not existing
- include: securitygroups.yml
tags: securitygroups
, который находится в roles/ec2-security-groups/tasks
; конечно есть main.yml в vars
The start.yml является:
- hosts: local
connection: local
gather_facts: False
vars:
ec2_instance_type: XXX
instance_tag_name: XXX
instance_tag_environnement: XXX
instance_tag_applicatif: XXX
instance_tag_composant: XXX
instance_tag_bloc: XXX
roles:
- ec2-security-groups
До этого работал, теперь я получаю следующее сообщение об ошибке:
<x.x.x.x> REMOTE_MODULE ec2_group name=XXX vpc_id=XXX region=XXX description='Security group for ssh'
fatal: [localhost -> x.x.x.x] => module ec2_group not found in /usr/share/ansible/cloud:/usr/share/ansible/packaging:/usr/share/ansible/files:/usr/share/ansible/windows:/usr/share/ansible/net_infrastructure:/usr/share/ansible/monitoring:/usr/share/ansible/system:/usr/share/ansible/web_infrastructure:/usr/share/ansible/notification:/usr/share/ansible
FATAL: all hosts have already failed -- aborting
Как это исправить? (Я не знаю, какая версия была ранее ...)
Как вы установить/обновить анзибль? Проблема с «модулем не найдена» может быть решена, и репозиторий git не был клонирован рекурсивно. – udondan
прямо с помощью sudo apt-get install ansible: s – sop
Теперь я удалил его как [здесь] (http://installion.co.uk/ubuntu/vivid/universe/a/ansible/uninstall/index.html) и переустановил его как [здесь] (http://docs.ansible.com/ansible/intro_installation.html#latest-releases-via-apt-ubuntu), но по-прежнему та же ошибка – sop