From de5e395bc0a0a4220c08dd2ad7c54888e72c9f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Thu, 22 Jun 2017 07:46:35 +0200 Subject: [PATCH] move some variables to role vars --- group_vars/all | 9 +++++---- roles/bootstrap/vars/main.yml | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 roles/bootstrap/vars/main.yml diff --git a/group_vars/all b/group_vars/all index 5768d69..89873a4 100644 --- a/group_vars/all +++ b/group_vars/all @@ -1,7 +1,8 @@ --- - timezone: Europe/Paris + # On some distro, /usr/bin/python does not exists... Here is the workaround + # to make it work everywhere ansible_python_interpreter: /usr/bin/python2 - ansible_ssh_user: redhat + + # The SSH Private Key that Ansible will use to connect to target hosts + # Also, the matching public key will be used by the "bootstrap" role. ansible_ssh_private_key_file: "{{ lookup('env','HOME') }}/.ssh/id_rsa" - ansible_ssh_public_key: "{{ lookup('file', ansible_ssh_private_key_file + '.pub' ) }}" - ansible_connection: ssh diff --git a/roles/bootstrap/vars/main.yml b/roles/bootstrap/vars/main.yml new file mode 100644 index 0000000..056bdaf --- /dev/null +++ b/roles/bootstrap/vars/main.yml @@ -0,0 +1,3 @@ +--- + # The SSH Public Key to add to the authorized_keys + ansible_ssh_public_key: "{{ lookup('file', ansible_ssh_private_key_file + '.pub' ) }}"