ansible-lxc-ssh | Ansible connection plugin using ssh lxc-attach | Continuous Deployment library
kandi X-RAY | ansible-lxc-ssh Summary
kandi X-RAY | ansible-lxc-ssh Summary
This plugin allows to use Ansible on a remote server hosting LXC containers, without having to install SSH servers in each LXC container. The plugin connects to the host using SSH, then uses lxc-attach to enter the container. This means the SSH connection must login as root, otherwise lxc-attach will fail.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Execute a command via SSH
- Run a command
- Build the command
- Analyze the output
- Execute a command
- Extract the persistence control parameters from the command line
- Add command line arguments
- Split command line arguments
- Terminate process
- Close the SSH connection
ansible-lxc-ssh Key Features
ansible-lxc-ssh Examples and Code Snippets
Community Discussions
Trending Discussions on ansible-lxc-ssh
QUESTION
I am new to ansible, and I am trying to use ansible on some lxc containers. My problem is that I don't want to install ssh on my containers. So
What I tried:
I tried to use this connection plugin but it seams that it does not work with ansible 2.
After understanding that chifflier connection plugin doesn't work, I tried to use the connection plugin from openstack.
After some failed attempts I dived into the code, and I understand that the plugin doesn't have the information that the host I am talking with is a container.(because the code never reached this point)
My current setup: {Ansbile host}---|ssh|---{vm}--|ansible connection plugin|---{container1}
My ansible.cfg:
...ANSWER
Answered 2017-Jul-17 at 20:21You should take a look at this lxc connection plugin. It might fit your needs.
Edit : lxc
connection plugin is actually part of Ansible.
Just add ansible_connection=lxc
in your inventory or group vars.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ansible-lxc-ssh
You can use ansible-lxc-ssh like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page