diff --git a/docs/usage.rst b/docs/usage.rst index b4f20d254a04db045f1577b1efc1a1eec76e9f3f..1f0b7de679c065a6ea5ff234fca23bb84e77490a 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -470,10 +470,18 @@ Let's bootstrap our machines now: roles: - bootstrap -2. The ``bootstrap`` role has only one parameter - an SSH key which should be - deployed for the Ansible user on managed server (in the ``authorized_keys`` - file). This defaults to content of local file ``~/.ssh/id_rsa.pub``, so no - need to make any changes so far. +2. The ``bootstrap`` role has only one parameter - an SSH key which + should be deployed for the Ansible user on managed server (in the + ``authorized_keys`` file). Since this role is applied against all + servers, we will use the same value everywhere. Configure the role: + + :file:`~/mysite/group_vars/all.yml` + + :: + + --- + + ansible_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}" 3. SSH into all machines at least once from the Ansible server in order to store the SSH fingerprints into known hosts file:: @@ -565,6 +573,8 @@ Let's take care of this common configuration right away: --- + ansible_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}" + os_users: - name: admin uid: 1000