defunctzombie / ansible-coreos-bootstrap

[NOT MAINTAINED] bootstrap a coreos machine for control via ansible

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getting python to work every login for ansible

IPvSean opened this issue · comments

The way the script is setup... does not make sense to me. You would have to run it in front of every playbook. What I was thinking (and I can give you the code, but here is the idea).

Run the traditional bootstrap.py, but this time at the end of the first playbook

  • delete /home/core/.bashrc (this is a symlink on coreOS, so now we can put a real bashrc)
  • cp /usr/share/skel/.bashrc . (this is where the symlink was from, we can now edit this copy)
  • add export PATH=$PATH:/home/core/bin to the end of the .bashrc file

Now every script from now on will be able to run the python that the original bootstrap.py could use. Want me to provide my code? Got this working....

actually... this does not work, see my other issue (#38).... you need to change the ansible python like this-> ansible_python_interpreter="/home/core/bin/python"

Reason:
ansible/ansible#9650

Seems like Ansible hardcodes where python is at?
"module_stdout": "/bin/sh: /usr/bin/python: No such file or directory\r\n",

Not really worth editing .bashrc at that point