Giter Site home page Giter Site logo

ansible-lxc-remote's People

Contributors

gu1 avatar manelclos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ansible-lxc-remote's Issues

Alternative name for containers

Is there a way to specify the container name? right now if I have a container named "webs" in two different hosts, I can't define both. Can something like this be done:?

host1_webs container_name=webs ansible_ssh_host=....
host2_webs container_name=webs ansible_ssh_host=....

Thanks!

AttributeError: 'module' object has no attribute 'VarsModule'

Hi,
I am testing the plugin, but I get this error when I add it to the library path (ansible v1.9.2).

    Traceback (most recent call last):
      File "/usr/bin/ansible", line 197, in <module>
        (runner, results) = cli.run(options, args)
      File "/usr/bin/ansible", line 121, in run
        inventory_manager = inventory.Inventory(options.inventory, vault_password=vault_pass)
      File "/usr/lib/pymodules/python2.7/ansible/inventory/__init__.py", line 141, in __init__
        self._vars_plugins = [ x for x in utils.plugins.vars_loader.all(self) ]
      File "/usr/lib/pymodules/python2.7/ansible/utils/plugins.py", line 233, in all
        yield getattr(self._module_cache[path], self.class_name)(*args, **kwargs)
    AttributeError: 'module' object has no attribute 'VarsModule'

From comparing the code of _ssh.py in your module to ssh.py in ansible v1.9.2, it looks like the module doesn't support the become_user changes.

Any ideas?
Thx

Support for Ansible 2.0

@Gu1 do you have plans to support Ansible 2.0? I would like to include your software in the next release of the TurnKey GNU/Linux Ansible appliance for managing containers on a TurnKey LXC appliance.

How to specify the remote user?

Hi,
I'm trying to connect from a controller machine ($USER==vagrant) through a remote lxc container (as user root2) to a container (as root).

However, it seems that the lxc-attach is being told to execute su as "vagrant" instead of "root", which doesn't exist in the container.
How can I set self.runner.remote_user on lxc_remote.py:71?

This happens when gathering facts.

inventory file:

remote-lxc-host        ansible_connection=ssh   ansible_ssh_port=222    ansible_ssh_user=root2    ansible_ssh_host=remote-lxc-host.somewhere.net

lxc-guest      ansible_connection=lxc_remote ansible_ssh_host=remote-lxc-host.somewhere.net ansible_ssh_port=222 ansible_ssh_user=root

exec log:

GATHERING FACTS *************************************************************** 
<remote-lxc-host.somewhere.net> ESTABLISH CONNECTION FOR USER: root
<remote-lxc-host.somewhere.net> REMOTE_MODULE setup
<remote-lxc-host.somewhere.net> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=15s -o GSSAPIAuthentication=no -v -o ForwardAgent=yes -o ControlPath="/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r" -o Port=222 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=20 remote-lxc-host.somewhere.net /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=gdcqpaagsswbweppbchwrcexoykwuovm] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-gdcqpaagsswbweppbchwrcexoykwuovm; lxc-attach --name lxc-guest -- /bin/su vagrant -c '"'"'"'"'"'"'"'"'mkdir -p /tmp/.ansible/$USER/ansible-tmp-1443830335.6-24620548920719 && chmod a+rx /tmp/.ansible/$USER/ansible-tmp-1443830335.6-24620548920719 && echo /tmp/.ansible/$USER/ansible-tmp-1443830335.6-24620548920719'"'"'"'"'"'"'"'"''"'"''
fatal: [lxc-guest] => Authentication or permission failure.  In some cases, you may have been able to authenticate and did not have permissions on the remote directory. Consider changing the remote temp path in ansible.cfg to a path rooted in "/tmp". Failed command was: mkdir -p /tmp/.ansible/$USER/ansible-tmp-1443830335.6-24620548920719 && chmod a+rx /tmp/.ansible/$USER/ansible-tmp-1443830335.6-24620548920719 && echo /tmp/.ansible/$USER/ansible-tmp-1443830335.6-24620548920719, exited with result 1: BECOME-SUCCESS-gdcqpaagsswbweppbchwrcexoykwuovm
No passwd entry for user 'vagrant'

Thx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.