From d2fa7c75da9bb592b49de8964b11b504e338ef56 Mon Sep 17 00:00:00 2001 From: jpic Date: Tue, 17 May 2016 16:08:16 +0200 Subject: [PATCH] Remove example from notes, syntax fix --- cloud/lxd/lxd_container.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/cloud/lxd/lxd_container.py b/cloud/lxd/lxd_container.py index 2fd2683758a..3a74a254ce0 100644 --- a/cloud/lxd/lxd_container.py +++ b/cloud/lxd/lxd_container.py @@ -64,18 +64,15 @@ notes: - 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 simply return as "unchanged". - - There are two ways to can run commands in containers. - - Use the command module, for example: - - name: Install python in the created container - command: lxc exec my-ubuntu -- apt install -y python - - Use the ansible lxd connection plugin bundled in Ansible 2.1 or later. - - In order to use this method, first you need to install python in the container - 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` + - There are two ways to can run commands in containers, using the command + module or using the ansible lxd connection plugin bundled in Ansible >= + 2.1, the later requires python to be installed in the container which can + be done with the command module. + - You can copy a file from the host to the container + with `command=lxc file push filename container_name/dir/filename` on localhost. See the first example below. - 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. """