2015-Middleware-Keynote / demo-ansible

Apache License 2.0
18 stars 24 forks source link

ansible-2.x support #79

Open ryanj opened 8 years ago

ryanj commented 8 years ago

The playbook doesn't seem to work with ansible 2.x:

[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and 
make sure become_method is 'sudo' (default). This feature will be removed in a 
future release. Deprecation warnings can be disabled by setting 
deprecation_warnings=False in ansible.cfg.
 [WARNING]: While constructing a mapping from /home/ryanj/src/openshift-
ansible/roles/openshift_cluster_metrics/tasks/main.yml, line 24, column 3, found
a duplicate dict key (register).  Using last defined value only.

PLAY ***************************************************************************

TASK [fail] ********************************************************************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "ERROR! The conditional check 'cluster_id is not defined or ec2_region is not defined or ec2_image is not defined or ec2_keypair is not defined or ec2_master_instance_type is not defined or ec2_infra_instance_type is not defined or ec2_node_instance_type is not defined or r53_zone is not defined or r53_host_zone is not defined or r53_wildcard_zone is not defined or num_app_nodes is not defined or hexboard_size is not defined or api_port is not defined or console_port is not defined or rhsm_user is not defined or rhsm_pass is not defined or deployment_type is not defined' failed. The error was: No module named runner.filter_plugins.core\n\nThe error appears to have been in '/home/ryanj/src/demo-ansible/playbooks/openshift_setup.yml': line 8, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  tasks:\n  - fail:\n    ^ here\n"}
juhoffma commented 8 years ago

same here

detiber commented 8 years ago

Yes, this is a known issue. The openshift-ansible playbooks and roles are in the same boat as well. We are tracking the openshift-ansible fixes (which will be a pre-requisite) here: https://trello.com/c/nA8oCXI3

Until then, unfortunately the answer is to use ansible 1.9.4 instead.

On Fri, Jan 29, 2016 at 5:43 PM, Juergen Hoffmann notifications@github.com wrote:

same here

— Reply to this email directly or view it on GitHub https://github.com/2015-Middleware-Keynote/demo-ansible/issues/79#issuecomment-177003486 .

Jason DeTiberus

ryanj commented 8 years ago

Looks like EPEL is also shipping 2.x now: https://dl.fedoraproject.org/pub/epel/7/x86_64/repoview/ansible.html

We're blocked on 2.x support in openshift-ansible for now

detiber commented 8 years ago

Temporary steps to install ansible 1.9.4:

# Install the epel repo if not already present
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# Clean yum metadata and cache to make sure we see the latest packages available
sudo yum clean all
# Install the ansible 1.9.4 package directly from koji
sudo yum install https://kojipkgs.fedoraproject.org//packages/ansible/1.9.4/1.el7/noarch/ansible-1.9.4-1.el7.noarch.rpm
# Disable EPEL to prevent unexpected packages from being pulled in during installation.
sudo yum-config-manager epel --disable