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:
parent
07ff52a218
commit
75ad9983f4
@ -14,8 +14,10 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
- name: Playbook for destroying test containers
|
- name: Playbook for destroying test containers
|
||||||
hosts: all_containers
|
hosts: all_containers
|
||||||
|
serial: 1
|
||||||
become: true
|
become: true
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
connection: local
|
||||||
tasks:
|
tasks:
|
||||||
- name: Destroy a container
|
- name: Destroy a container
|
||||||
lxc_container:
|
lxc_container:
|
||||||
|
@ -13,10 +13,17 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
- name: Playbook for creating containers
|
||||||
|
hosts: localhost
|
||||||
|
become: true
|
||||||
|
gather_facts: true
|
||||||
|
|
||||||
- include: destroy_containers.yml
|
- include: destroy_containers.yml
|
||||||
when: destroy_first | default(True) | bool
|
when: destroy_first | default(True) | bool
|
||||||
|
|
||||||
- name: Playbook for creating containers
|
- name: Playbook for creating containers
|
||||||
hosts: all_containers
|
hosts: all_containers
|
||||||
|
serial: 1
|
||||||
become: true
|
become: true
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
roles:
|
roles:
|
||||||
|
Loading…
Reference in New Issue
Block a user