Fix container destroy/create

The container destroy playbook was attempting to ssh to the targets
it was destroying instead of simply connecting to the localhost and
removing them. This change allows the connection to be local allowing
the destroy to go through.

This also changes the container create and destroy tasks to be done
in serial. This is being done due to potential control path issues.

Change-Id: Ide0fa39bfef917abd8b0abf1b5c9991beae9c10b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2016-09-16 11:26:37 -05:00
parent 07ff52a218
commit 75ad9983f4
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F
2 changed files with 9 additions and 0 deletions

View File

@ -14,8 +14,10 @@
# limitations under the License.
- name: Playbook for destroying test containers
hosts: all_containers
serial: 1
become: true
gather_facts: false
connection: local
tasks:
- name: Destroy a container
lxc_container:

View File

@ -13,10 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Playbook for creating containers
hosts: localhost
become: true
gather_facts: true
- include: destroy_containers.yml
when: destroy_first | default(True) | bool
- name: Playbook for creating containers
hosts: all_containers
serial: 1
become: true
gather_facts: false
roles: