-
Notifications
You must be signed in to change notification settings - Fork 2k
hostvars['127.0.0.1']['ansible_system'] may not exist #739
Comments
Hi @dmitry-kulikov, I believe I've seen this error on my local machine as well and had meant to make a note to fix it. Thanks for reporting! It obviously slipped my mind 😆 I'd like to look into this a little bit deeper but won't have the time immediately. I'll try to have a fix posted in the next day or two. It should be safe to ignore this error in the mean time, you will just have to open the generated documentation yourself manually (which was probably already true if you are doing a localhost install on a remote server). Thanks again! |
I was able to reproduce this on Archlinux with Ansible 2.3.1.0.
I think this will patch around the error but it won't result in Linux clients having the docs opened. I'd rather find a better solution if possible. On my system I notice that there is no |
Update: using "localhost" didn't help. I'm a bit stumped. It seems |
Prior to this commit Streisand universally assumed the user's SSH public key was `~/.ssh/id_rsa.pub`. This SSH key was then used to provision cloud instances. This commit adds a new `streisand_ssh_key` var to the `global_vars/default-site.yml` file. The site-specific override for these defaults, `~/.streisand/site.yml` is now customized by `playbooks/customize.yml` when the user specifies that they want to use a different SSH pubkey. The user is expected to have the private component loaded into their ssh agent or to customize Ansible to know how to load it. The validation playbook is updated to check that the `streisand_ssh_key` exists. The corresponding shell based checks for the SSH key were removed from the `./streisand` wrapper script since they are now replaced by these Ansible tasks. Similarly the existing server playbook now performs its own quick test of a raw_cmd on the server instead of doing a SSH check in the `./streisand` wrapper. This means things fail a little bit later in the process if you can't actually SSH to the existing server but it isn't *much* later in the process and its nice to rm some shell script code. Three unrelated bugs were fixed with the existing server provisioning. First: There was a typo in the `./streisand` wrapper script's `local_provision` function that was running a non-existent playbook. Second: the genesis role was not being saved as a fact on localhost causing the diagnostics to print "unknown" for the genesis role used. Lastly, because no `gather_facts: yes` for the localhost was run for the existing server provision other diagnostic information was missing. This was also the root cause of Issue StreisandEffect#739. All of the above are now fixed! Yay \o/
I figured out the root cause of this bug while working on something separate. Serendipity! The tl;dr is that the existing server flow never ended up running a I've fixed it as part of cpu@134e00a - I haven't opened a PR for this commit yet since it builds on top of #936 but I expect I will be able to merge it in the next week or so. |
Prior to this PR Streisand universally assumed the user's SSH private key was `~/.ssh/id_rsa`. The public component was then used to provision cloud instances. This PR adds a new `streisand_ssh_private_key` var to the `global_vars/default-site.yml` file. The site-specific override for these defaults, `~/.streisand/site.yml` is now customized by `playbooks/customize.yml` when the user specifies that they want to use a different SSH key. The public component is expected to exist at the same file path with a `.pub` suffix to keep things simple. This PR proactively sets the `ansible_ssh_private_key_file` for the Streisand SSH key specified. This ensures Ansible will load & use this private key to access the streisand-host bypassing the need to use a ssh-agent (though it will play nicely if you do). The validation playbook is updated to check that the `streisand_ssh_private_key` exists. The corresponding shell based checks for the SSH key were removed from the `./streisand` wrapper script since they are now replaced by these Ansible tasks. Similarly the existing server playbook now performs its own quick test of a raw_cmd on the server instead of doing a SSH check in the `./streisand` wrapper. This means things fail a little bit later in the process if you can't actually SSH to the existing server but it isn't *much* later in the process and its nice to `rm` some shell script code. Two unrelated bugs were fixed with the existing server provisioning: the genesis role was not being saved as a fact on localhost causing the diagnostics to print "unknown" for the genesis role used. Secondly, because no `gather_facts: yes` for the localhost was run for the existing server provision other diagnostic information was missing. This was also the root cause of Issue #739. Resolves #739, #300
Should be all fixed in master by way of #970. |
Expected behavior:
Installation completed without errors.
Actual Behavior:
Installation completed with minor errors:
Steps to Reproduce:
Run
./streisand
.Additional Details:
Really minor issue. I guess it should be fixed by replacing of
and
Target Cloud Provider: Scaleway
Operating System of target host: Ubuntu 16.04
Operating System of client: Ubuntu 14.04
Version of Ansible, using
ansible --version
: 2.3.1.0The text was updated successfully, but these errors were encountered: