Remove example from notes, syntax fix
This commit is contained in:
parent
5da4699f83
commit
d2fa7c75da
1 changed files with 7 additions and 10 deletions
|
@ -64,18 +64,15 @@ notes:
|
||||||
- Containers must have a unique name. If you attempt to create a container
|
- Containers must have a unique name. If you attempt to create a container
|
||||||
with a name that already existed in the users namespace the module will
|
with a name that already existed in the users namespace the module will
|
||||||
simply return as "unchanged".
|
simply return as "unchanged".
|
||||||
- There are two ways to can run commands in containers.
|
- There are two ways to can run commands in containers, using the command
|
||||||
- Use the command module, for example:
|
module or using the ansible lxd connection plugin bundled in Ansible >=
|
||||||
- name: Install python in the created container
|
2.1, the later requires python to be installed in the container which can
|
||||||
command: lxc exec my-ubuntu -- apt install -y python
|
be done with the command module.
|
||||||
- Use the ansible lxd connection plugin bundled in Ansible 2.1 or later.
|
- You can copy a file from the host to the container
|
||||||
- In order to use this method, first you need to install python in the container
|
with `command=lxc file push filename container_name/dir/filename`
|
||||||
with the above method. See the first example below.
|
|
||||||
- You can copy a file in the localhost to the created container
|
|
||||||
running `command: lxc file push filename container_name/dir/filename`
|
|
||||||
on localhost. See the first example below.
|
on localhost. See the first example below.
|
||||||
- You can copy a file in the creatd container to the localhost
|
- You can copy a file in the creatd container to the localhost
|
||||||
running `command: lxc file pull container_name/dir/filename filename`.
|
with `command=lxc file pull container_name/dir/filename filename`.
|
||||||
See the first example below.
|
See the first example below.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue