From b1038f2c7a52f6ce6bb9389b534792fc3187a38c Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Fri, 23 Sep 2016 21:42:52 -0700 Subject: [PATCH] s/ansible_ssh_/ansible_ --- ch01/playbooks/hosts | 2 +- ch02/playbooks/hosts | 2 +- ch03/inventory/vagrant.py | 8 ++++---- ch04/playbooks/hosts | 6 +++--- ch06/playbooks/hosts | 2 +- ch06/playbooks/mezzanine.yml | 2 +- ch08/playbooks/roles/mezzanine/vars/main.yml | 2 +- ch09/playbooks/templates/disable-requiretty.j2 | 2 +- ch10/playbooks/hosts | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ch01/playbooks/hosts b/ch01/playbooks/hosts index 23c16b4..22a5c9f 100644 --- a/ch01/playbooks/hosts +++ b/ch01/playbooks/hosts @@ -1 +1 @@ -testserver ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 +testserver ansible_host=127.0.0.1 ansible_port=2222 diff --git a/ch02/playbooks/hosts b/ch02/playbooks/hosts index 2ba623d..1f1cdb7 100644 --- a/ch02/playbooks/hosts +++ b/ch02/playbooks/hosts @@ -1,2 +1,2 @@ [webservers] -testserver ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 +testserver ansible_host=127.0.0.1 ansible_port=2222 diff --git a/ch03/inventory/vagrant.py b/ch03/inventory/vagrant.py index 767a6f0..33b3c85 100755 --- a/ch03/inventory/vagrant.py +++ b/ch03/inventory/vagrant.py @@ -33,10 +33,10 @@ def get_host_details(host): config = paramiko.SSHConfig() config.parse(p.stdout) c = config.lookup(host) - return {'ansible_ssh_host': c['hostname'], - 'ansible_ssh_port': c['port'], - 'ansible_ssh_user': c['user'], - 'ansible_ssh_private_key_file': c['identityfile'][0]} + return {'ansible_host': c['hostname'], + 'ansible_port': c['port'], + 'ansible_user': c['user'], + 'ansible_private_key_file': c['identityfile'][0]} def main(): diff --git a/ch04/playbooks/hosts b/ch04/playbooks/hosts index 33a75be..a884145 100644 --- a/ch04/playbooks/hosts +++ b/ch04/playbooks/hosts @@ -1,7 +1,7 @@ [vagrant] -server1 ansible_ssh_host=192.168.4.10 ansible_ssh_user=vagrant ansible_ssh_private_key_file=.vagrant/machines/ubuntu/virtualbox/private_key -server2 ansible_ssh_host=192.168.4.11 ansible_ssh_user=vagrant ansible_ssh_private_key_file=.vagrant/machines/centos/virtualbox/private_key -server3 ansible_ssh_host=192.168.4.12 ansible_ssh_user=vagrant ansible_ssh_private_key_file=.vagrant/machines/precise/virtualbox/private_key +server1 ansible_host=192.168.4.10 ansible_user=vagrant ansible_private_key_file=.vagrant/machines/ubuntu/virtualbox/private_key +server2 ansible_host=192.168.4.11 ansible_user=vagrant ansible_private_key_file=.vagrant/machines/centos/virtualbox/private_key +server3 ansible_host=192.168.4.12 ansible_user=vagrant ansible_private_key_file=.vagrant/machines/precise/virtualbox/private_key [ubuntu] diff --git a/ch06/playbooks/hosts b/ch06/playbooks/hosts index 3386f5e..b3e4f80 100644 --- a/ch06/playbooks/hosts +++ b/ch06/playbooks/hosts @@ -1 +1 @@ -web ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 +web ansible_host=127.0.0.1 ansible_port=2222 diff --git a/ch06/playbooks/mezzanine.yml b/ch06/playbooks/mezzanine.yml index cb0bfcb..7d646a0 100644 --- a/ch06/playbooks/mezzanine.yml +++ b/ch06/playbooks/mezzanine.yml @@ -2,7 +2,7 @@ - name: Deploy mezzanine hosts: web vars: - user: "{{ ansible_ssh_user }}" + user: "{{ ansible_user }}" proj_name: mezzanine-example venv_home: "{{ ansible_env.HOME }}" venv_path: "{{ venv_home }}/{{ proj_name }}" diff --git a/ch08/playbooks/roles/mezzanine/vars/main.yml b/ch08/playbooks/roles/mezzanine/vars/main.yml index 77eabea..40d1c79 100644 --- a/ch08/playbooks/roles/mezzanine/vars/main.yml +++ b/ch08/playbooks/roles/mezzanine/vars/main.yml @@ -1,6 +1,6 @@ --- # vars file for mezzanine -mezzanine_user: "{{ ansible_ssh_user }}" +mezzanine_user: "{{ ansible_user }}" mezzanine_venv_home: "{{ ansible_env.HOME }}" mezzanine_venv_path: "{{ mezzanine_venv_home }}/{{ mezzanine_proj_name }}" mezzanine_repo_url: git@github.com:lorin/mezzanine-example.git diff --git a/ch09/playbooks/templates/disable-requiretty.j2 b/ch09/playbooks/templates/disable-requiretty.j2 index 9a5cbaf..2e1122f 100644 --- a/ch09/playbooks/templates/disable-requiretty.j2 +++ b/ch09/playbooks/templates/disable-requiretty.j2 @@ -1 +1 @@ -Defaults:{{ ansible_ssh_user }} !requiretty +Defaults:{{ ansible_user }} !requiretty diff --git a/ch10/playbooks/hosts b/ch10/playbooks/hosts index 23c16b4..22a5c9f 100644 --- a/ch10/playbooks/hosts +++ b/ch10/playbooks/hosts @@ -1 +1 @@ -testserver ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 +testserver ansible_host=127.0.0.1 ansible_port=2222 -- 2.44.0