Re: [openstack-dev] [ironic][bifrost] Unable to Enroll Inventory

2017-08-07 Thread Mark Goddard
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 
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@ubuntu-jumphost:~/bifrost$ sudo bash ./scripts/env-setup.sh
>
> stack@ubuntu-jumphost:~/bifrost$ source env-vars
>
> stack@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@ubuntu-jumphost:~/bifrost/playbooks$ which ansible
> /home/stack/.local/bin/ansible
> stack@ubuntu-jumphost:~/bifrost/playbooks$ ansible-playbook - -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 
> import ansible.constants as C
> ImportError: No module named ansible.constants
>
> stack@ubuntu-jumphost:~/bifrost/playbooks$ ansible --version
> Traceback (most recent call last):
>   File "/home/stack/.local/bin/ansible", line 44, in 
> 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  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-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [ironic][bifrost] Unable to Enroll Inventory

2017-08-03 Thread Aimee Ukasick
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@ubuntu-jumphost:~/bifrost$ sudo bash ./scripts/env-setup.sh

stack@ubuntu-jumphost:~/bifrost$ source env-vars

stack@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@ubuntu-jumphost:~/bifrost/playbooks$ which ansible
/home/stack/.local/bin/ansible
stack@ubuntu-jumphost:~/bifrost/playbooks$ ansible-playbook - -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 
import ansible.constants as C
ImportError: No module named ansible.constants

stack@ubuntu-jumphost:~/bifrost/playbooks$ ansible --version
Traceback (most recent call last):
  File "/home/stack/.local/bin/ansible", line 44, in 
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  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-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev