[root@master openshift-ansible]# cat /etc/ansible/hosts
[masters]
master.yabo.com
[nodes]
master.yabo.com openshift_node_group_name='node-config-master'
node1.yabo.com openshift_node_group_name='node-config-compute'
node2.yabo.com openshift_node_group_name='node-config-compute'
[OSEv3:vars]
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider',}]
openshift_master_default_subdomain=yabo.com
openshift_deployment_type=origin
ansible_ssh_user=root
openshift_metrics_install_metrics=true
openshift_logging_install_logging=true
[OSEv3:children]
masters
nodes
在执行 ansible-playbook -i /etc/ansible/hosts playbooks/deploy_cluster.yml 的时候抛出如下异常:
Failure summary:
Hosts: master.yabo.com
Play: OpenShift Health Checks
Task: Run health checks (install) - EL
Message: One or more checks failed
Details: check "docker_image_availability":
Unable to look up a name or access an attribute in template string ({{ inventory_hostname in groups['oo_etcd_to_config'] }}).
Make sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable
Traceback (most recent call last):
File "/root/openshift-ansible/roles/openshift_health_checker/action_plugins/openshift_health_check.py", line 225, in run_check
result = check.run()
File "/root/openshift-ansible/roles/openshift_health_checker/openshift_checks/docker_image_availability.py", line 108, in run
self.get_var('openshift_health_check_required_images'))
File "/root/openshift-ansible/roles/openshift_health_checker/openshift_checks/__init__.py", line 103, in template_var
return self._templar.template(var_to_template)
File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 490, in template
disable_lookups=disable_lookups,
File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 772, in do_template
raise AnsibleUndefinedVariable(e)
AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string ({{ inventory_hostname in groups['oo_etcd_to_config'] }}).
Make sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable
check "package_availability":
Cannot install all of the necessary packages. Unavailable:
origin
origin-clients
origin-hyperkube
origin-node
You may need to enable one or more yum repositories to make this content available.
Hosts: node1.yabo.com, node2.yabo.com
Play: OpenShift Health Checks
Task: Run health checks (install) - EL
Message: One or more checks failed
Details: check "docker_image_availability":
Unable to look up a name or access an attribute in template string ({{ inventory_hostname in groups['oo_etcd_to_config'] }}).
Make sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable
Traceback (most recent call last):
File "/root/openshift-ansible/roles/openshift_health_checker/action_plugins/openshift_health_check.py", line 225, in run_check
result = check.run()
File "/root/openshift-ansible/roles/openshift_health_checker/openshift_checks/docker_image_availability.py", line 108, in run
self.get_var('openshift_health_check_required_images'))
File "/root/openshift-ansible/roles/openshift_health_checker/openshift_checks/__init__.py", line 103, in template_var
return self._templar.template(var_to_template)
File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 490, in template
disable_lookups=disable_lookups,
File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 772, in do_template
raise AnsibleUndefinedVariable(e)
AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string ({{ inventory_hostname in groups['oo_etcd_to_config'] }}).
Make sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable
check "package_availability":
Cannot install all of the necessary packages. Unavailable:
origin
origin-node
You may need to enable one or more yum repositories to make this content available.
The execution of "playbooks/deploy_cluster.yml" includes checks designed to fail early if the requirements of the playbook are not met. One or more of these checks failed. To disregard these results,explicitly disable checks by setting an Ansible variable:
openshift_disable_check=docker_image_availability,package_availability
Failing check names are shown in the failure details above. Some checks may be configurable by variables if your requirements are different from the defaults; consult check documentation.
Variables can be set in the inventory or passed on the command line using the -e flag to ansible-playbook.
有人采坑吗?