Browse Source
Merge pull request #2381 from vikas027/inventory_fixes
Replaced ansible_ssh_host with ansible_host in sample inventory file and fixed usage of bastion
pull/2670/head
Aivars Sterns
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
8 deletions
-
inventory/sample/hosts.ini
-
roles/kubespray-defaults/defaults/main.yaml
|
|
@ -1,14 +1,14 @@ |
|
|
|
# ## Configure 'ip' variable to bind kubernetes services on a |
|
|
|
# ## different ip than the default iface |
|
|
|
# node1 ansible_ssh_host=95.54.0.12 # ip=10.3.0.1 |
|
|
|
# node2 ansible_ssh_host=95.54.0.13 # ip=10.3.0.2 |
|
|
|
# node3 ansible_ssh_host=95.54.0.14 # ip=10.3.0.3 |
|
|
|
# node4 ansible_ssh_host=95.54.0.15 # ip=10.3.0.4 |
|
|
|
# node5 ansible_ssh_host=95.54.0.16 # ip=10.3.0.5 |
|
|
|
# node6 ansible_ssh_host=95.54.0.17 # ip=10.3.0.6 |
|
|
|
# node1 ansible_host=95.54.0.12 # ip=10.3.0.1 |
|
|
|
# node2 ansible_host=95.54.0.13 # ip=10.3.0.2 |
|
|
|
# node3 ansible_host=95.54.0.14 # ip=10.3.0.3 |
|
|
|
# node4 ansible_host=95.54.0.15 # ip=10.3.0.4 |
|
|
|
# node5 ansible_host=95.54.0.16 # ip=10.3.0.5 |
|
|
|
# node6 ansible_host=95.54.0.17 # ip=10.3.0.6 |
|
|
|
|
|
|
|
# ## configure a bastion host if your nodes are not directly reachable |
|
|
|
# bastion ansible_ssh_host=x.x.x.x |
|
|
|
# bastion ansible_host=x.x.x.x ansible_user=some_user |
|
|
|
|
|
|
|
# [kube-master] |
|
|
|
# node1 |
|
|
|
|
|
@ -5,7 +5,7 @@ bootstrap_os: none |
|
|
|
|
|
|
|
# Use proxycommand if bastion host is in group all |
|
|
|
# This change obseletes editing ansible.cfg file depending on bastion existance |
|
|
|
ansible_ssh_common_args: "{% if 'bastion' in groups['all'] %} -o ProxyCommand='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -W %h:%p {{ ansible_user }}@{{hostvars['bastion']['ansible_host']}} {% if ansible_ssh_private_key_file is defined %}-i {{ ansible_ssh_private_key_file }}{% endif %} ' {% endif %}" |
|
|
|
ansible_ssh_common_args: "{% if 'bastion' in groups['all'] %} -o ProxyCommand='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -W %h:%p {{ hostvars['bastion']['ansible_user'] }}@{{ hostvars['bastion']['ansible_host'] }} {% if ansible_ssh_private_key_file is defined %}-i {{ ansible_ssh_private_key_file }}{% endif %} ' {% endif %}" |
|
|
|
|
|
|
|
kube_api_anonymous_auth: false |
|
|
|
|
|
|
|