Changeset - de371a285d33
[Not reviewed]
0 1 0
Branko Majic (branko) - 4 years ago 2020-10-01 23:01:33
branko@majic.rs
MAR-155: Updated usage instructions to cover setting ansible_key parameter for the bootstrap role.
1 file changed with 14 insertions and 4 deletions:
0 comments (0 inline, 0 general)
docs/usage.rst
Show inline comments
 
@@ -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
0 comments (0 inline, 0 general)