[openstack-dev] [ironic][bifrost] Unable to Enroll Inventory
Mark Goddard
mark at stackhpc.com
Mon Aug 7 10:41:09 UTC 2017
Hi Aimee,
I suspect the reason that ansible is owned by root in your setup is that
you ran scripts/env-setup.sh using sudo. Could you paste the errors seen
when running without sudo?
Mark
On 3 August 2017 at 23:09, Aimee Ukasick <aimeeu.opensource at gmail.com>
wrote:
> Thanks Mark for pointing me in the right direction! It turned out to
> be a permissions issue with the local Ansible installation.
>
> I started over with a new user (stack, passwordless sudo) and decided
> to use the bifrost's env-setup script, which I was not able to run
> unless prefaced with sudo.
>
>
> stack at ubuntu-jumphost:~/bifrost$ sudo bash ./scripts/env-setup.sh
>
> stack at ubuntu-jumphost:~/bifrost$ source env-vars
>
> stack at ubuntu-jumphost:~/bifrost$ echo $PATH
> /home/stack/.local/bin:/home/stack/bin:/home/stack/.local/
> bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
> sbin:/bin:/usr/games:/usr/local/games:/snap/bin
>
> stack at ubuntu-jumphost:~/bifrost/playbooks$ which ansible
> /home/stack/.local/bin/ansible
> stack at ubuntu-jumphost:~/bifrost/playbooks$ ansible-playbook -vvvv -i
> inventory/target install.yaml -e staging_drivers_include=true
> Traceback (most recent call last):
> File "/home/stack/.local/bin/ansible-playbook", line 44, in <module>
> import ansible.constants as C
> ImportError: No module named ansible.constants
>
> stack at ubuntu-jumphost:~/bifrost/playbooks$ ansible --version
> Traceback (most recent call last):
> File "/home/stack/.local/bin/ansible", line 44, in <module>
> import ansible.constants as C
> ImportError: No module named ansible.constants
>
> The ~/.local/bin/ansible folder was owned by root:root as was
> ~/.ansible. Once I changed the ownership to stack:stack, ansible
> worked as expected. I was able to run the ansible-playbook command
> without prefacing it with sudo. So I had a successful installation. Do
> you know why the bifrost env-setup.sh installed ansible with root
> ownership in my ~/.local directory? Is that the default Ansible
> behavior? Is the expectation that I switch to root to install/run
> bifrost?
>
>
> I was able to enroll my servers without a hitch.
>
> Friday I plan to deploy - hopefully I've identified and fixed all the
> kinks on my system.
>
>
> Thanks again for your help!
>
> aimee
> irc:aimeeu
>
>
>
> On Thu, Aug 3, 2017 at 3:27 AM, Mark Goddard <mark at stackhpc.com> wrote:
> > Hi Aimee,
> >
> > My guess is that your error is due to your use of sudo when running
> > ansible-playbook.
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170807/b98f66cb/attachment.html>
More information about the OpenStack-dev
mailing list