From 608254f0a136eb0de4abab904716ae84418b48d8 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Wed, 17 Feb 2021 13:35:08 +0000 Subject: [PATCH] Remove duplicate lxc volume tasks These tasks are duplicated in both lxc_cache_preparation_simple.yml and lxc_volume.yml, so we remove one of the duplicate set of tasks. Change-Id: I5e5ea241308a11b79864885584944037dfecc6bc --- tasks/lxc_cache_preparation.yml | 2 -- tasks/lxc_volume.yml | 52 --------------------------------- 2 files changed, 54 deletions(-) delete mode 100644 tasks/lxc_volume.yml diff --git a/tasks/lxc_cache_preparation.yml b/tasks/lxc_cache_preparation.yml index 841b1622..eaa18ac3 100644 --- a/tasks/lxc_cache_preparation.yml +++ b/tasks/lxc_cache_preparation.yml @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include_tasks: lxc_volume.yml - - include_tasks: lxc_cache_preparation_simple.yml # NOTE(cloudnull): We're using rsync and an if block because we've no means diff --git a/tasks/lxc_volume.yml b/tasks/lxc_volume.yml deleted file mode 100644 index e5b722e7..00000000 --- a/tasks/lxc_volume.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -# Copyright 2017, Rackspace US, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -- name: Create sparse machines file - command: "truncate -s 11G /var/lib/machines.raw" - args: - creates: /var/lib/machines.raw - register: machines_create - -- name: Format the machines file - filesystem: - fstype: ext4 - dev: /var/lib/machines.raw - when: - - machines_create is changed - -- name: Create machines mount point - file: - path: "/var/lib/machines" - state: "directory" - recurse: true - -- name: Move machines mount into place - copy: - src: var-lib-machines.mount - dest: /lib/systemd/system/var-lib-machines.mount - register: mount_unit - -- name: Reload the System daemon - systemd: - daemon_reload: yes - when: mount_unit is changed - -- name: Mount all - shell: "mount | grep '/var/lib/machines' || (systemctl start var-lib-machines.mount && exit 3)" - register: mount_machines - changed_when: mount_machines.rc == 3 - failed_when: mount_machines.rc not in [0, 3] - tags: - - skip_ansible_lint