Skip to content

Instantly share code, notes, and snippets.

@s3w47m88
Created October 5, 2017 06:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s3w47m88/9a52248ffb841c041a21a6c7a6e392f4 to your computer and use it in GitHub Desktop.
Save s3w47m88/9a52248ffb841c041a21a6c7a6e392f4 to your computer and use it in GitHub Desktop.
➜ trellis git:(master) ansible-playbook server.yml -e env=staging
[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use
'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions.
This feature will be removed in a future release. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
PLAY [Ensure necessary variables are defined] **********************************
TASK [Ensure environment is defined] *******************************************
skipping: [localhost]
PLAY [Test Connection and Determine Remote User] *******************************
TASK [connection : Require manual definition of remote-user] *******************
skipping: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Specify preferred HostKeyAlgorithms for unknown hosts] ******
skipping: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Check whether Ansible can connect as root] ******************
ok: [thewaitstaffteam.theportlandcompany.com -> localhost]
TASK [connection : Warn about change in host keys] *****************************
skipping: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Set remote user for each host] ******************************
ok: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Announce which user was selected] ***************************
Note: Ansible will attempt connections as user = admin
ok: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Load become password] ***************************************
ok: [thewaitstaffteam.theportlandcompany.com]
PLAY [Install prerequisites] ***************************************************
TASK [Install Python 2.x] ******************************************************
System info:
Ansible 2.4.0.0; Darwin
Trellis at "Normalize `apt` tasks"
---------------------------------------------------
Failed to connect to the host via ssh: Permission denied (publickey).
fatal: [thewaitstaffteam.theportlandcompany.com]: UNREACHABLE! => {"changed": false, "unreachable": true}
to retry, use: --limit @/Users/s3w47m88/Sites/thewaitstaffteam.com/trellis/server.retry
PLAY RECAP *********************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=0
thewaitstaffteam.theportlandcompany.com : ok=4 changed=0 unreachable=1 failed=0
➜ trellis git:(master) ✗ ssh web@thewaitstaffteam.theportlandcompany.com
Permission denied (publickey).
➜ trellis git:(master) ✗ ssh root@thewaitstaffteam.theportlandcompany.com
Enter passphrase for key '/Users/s3w47m88/.ssh/id_rsa':
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-93-generic x86_64)
staging.kangapestcontrol.com,192.241.210.52 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA * Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
43 packages can be updated.
22 updates are security updates.
Last login: Thu Oct 5 06:23:42 2017 from 50.53.148.199
root@thewaitstaffteam:~# cd ~/.ssh
root@thewaitstaffteam:~/.ssh# ls
authorized_keys
root@thewaitstaffteam:~/.ssh# vi authorized_keys
root@thewaitstaffteam:~/.ssh# ls -lA
total 4
-rw------- 1 root root 2006 Oct 5 06:17 authorized_keys
root@thewaitstaffteam:~/.ssh# ls /home
root@thewaitstaffteam:~/.ssh# exit
logout
Connection to thewaitstaffteam.theportlandcompany.com closed.
➜ trellis git:(master) ✗ vi ~/.ssh/known_hosts
➜ trellis git:(master) ✗ ansible-playbook server.yml -e env=staging
[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use
'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions.
This feature will be removed in a future release. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
PLAY [Ensure necessary variables are defined] **********************************
TASK [Ensure environment is defined] *******************************************
skipping: [localhost]
PLAY [Test Connection and Determine Remote User] *******************************
TASK [connection : Require manual definition of remote-user] *******************
skipping: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Specify preferred HostKeyAlgorithms for unknown hosts] ******
ok: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Check whether Ansible can connect as root] ******************
ok: [thewaitstaffteam.theportlandcompany.com -> localhost]
TASK [connection : Warn about change in host keys] *****************************
skipping: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Set remote user for each host] ******************************
ok: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Announce which user was selected] ***************************
Note: Ansible will attempt connections as user = admin
Note: The host `thewaitstaffteam.theportlandcompany.com` was not detected in
known_hosts
so Trellis prompted the host to offer a key type that will work with
the stronger key types Trellis configures on the server. This avoids future
connection failures due to changed host keys. Trellis used this SSH option:
-o HostKeyAlgorithms=ssh-ed25519-cert-v01@openssh.com,ssh-rsa-
cert-v01@openssh.com,ssh-ed25519,ssh-rsa
To prevent Trellis from ever using this SSH option, add this to group_vars:
dynamic_host_key_algorithms: false
ok: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Load become password] ***************************************
ok: [thewaitstaffteam.theportlandcompany.com]
PLAY [Install prerequisites] ***************************************************
TASK [Install Python 2.x] ******************************************************
The authenticity of host 'thewaitstaffteam.theportlandcompany.com (107.170.194.131)' can't be established.
ED25519 key fingerprint is SHA256:vU0x749TOS33JeDWvvXO9xCeCSR8xzJSxt3Rcsn/Ik8.
Are you sure you want to continue connecting (yes/no)? yes
System info:
Ansible 2.4.0.0; Darwin
Trellis at "Normalize `apt` tasks"
---------------------------------------------------
Failed to connect to the host via ssh: Permission denied (publickey).
fatal: [thewaitstaffteam.theportlandcompany.com]: UNREACHABLE! => {"changed": false, "unreachable": true}
to retry, use: --limit @/Users/s3w47m88/Sites/thewaitstaffteam.com/trellis/server.retry
PLAY RECAP *********************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=0
thewaitstaffteam.theportlandcompany.com : ok=5 changed=0 unreachable=1 failed=0
➜ trellis git:(master) ✗ ansible-playbook server.yml -e env=staging
[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use 'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions. This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
PLAY [Ensure necessary variables are defined] ******************************************************************************************************************************************************************************************************************************************************************************************************************************
TASK [Ensure environment is defined] ***************************************************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [localhost]
PLAY [Test Connection and Determine Remote User] ***************************************************************************************************************************************************************************************************************************************************************************************************************************
TASK [connection : Require manual definition of remote-user] ***************************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Specify preferred HostKeyAlgorithms for unknown hosts] **************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Check whether Ansible can connect as root] **************************************************************************************************************************************************************************************************************************************************************************************************************
ok: [thewaitstaffteam.theportlandcompany.com -> localhost]
TASK [connection : Warn about change in host keys] *************************************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Set remote user for each host] **************************************************************************************************************************************************************************************************************************************************************************************************************************
ok: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Announce which user was selected] ***********************************************************************************************************************************************************************************************************************************************************************************************************************
Note: Ansible will attempt connections as user = admin
ok: [thewaitstaffteam.theportlandcompany.com]
TASK [connection : Load become password] ***********************************************************************************************************************************************************************************************************************************************************************************************************************************
ok: [thewaitstaffteam.theportlandcompany.com]
PLAY [Install prerequisites] ***********************************************************************************************************************************************************************************************************************************************************************************************************************************************
TASK [Install Python 2.x] **************************************************************************************************************************************************************************************************************************************************************************************************************************************************
System info:
Ansible 2.4.0.0; Darwin
Trellis at "Normalize `apt` tasks"
---------------------------------------------------
Failed to connect to the host via ssh: Permission denied (publickey).
fatal: [thewaitstaffteam.theportlandcompany.com]: UNREACHABLE! => {"changed": false, "unreachable": true}
to retry, use: --limit @/Users/s3w47m88/Sites/thewaitstaffteam.com/trellis/server.retry
PLAY RECAP *****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=0
thewaitstaffteam.theportlandcompany.com : ok=4 changed=0 unreachable=1 failed=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment