mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
shorten up the assemble module
This commit is contained in:
parent
f787cda7be
commit
772e241d1f
1 changed files with 0 additions and 17 deletions
|
@ -17,24 +17,12 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
try:
|
|
||||||
import json
|
|
||||||
except ImportError:
|
|
||||||
import simplejson as json
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import sys
|
import sys
|
||||||
import shlex
|
|
||||||
import shutil
|
import shutil
|
||||||
import syslog
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
try:
|
|
||||||
from hashlib import md5 as _md5
|
|
||||||
except ImportError:
|
|
||||||
from md5 import md5 as _md5
|
|
||||||
|
|
||||||
|
|
||||||
# ===========================================
|
# ===========================================
|
||||||
# Support methods
|
# Support methods
|
||||||
|
|
||||||
|
@ -71,11 +59,6 @@ def main():
|
||||||
src = os.path.expanduser(module.params['src'])
|
src = os.path.expanduser(module.params['src'])
|
||||||
dest = os.path.expanduser(module.params['dest'])
|
dest = os.path.expanduser(module.params['dest'])
|
||||||
|
|
||||||
if src:
|
|
||||||
src = os.path.expanduser(src)
|
|
||||||
if dest:
|
|
||||||
dest = os.path.expanduser(dest)
|
|
||||||
|
|
||||||
if not os.path.exists(src):
|
if not os.path.exists(src):
|
||||||
fail_json(msg="Source (%s) does not exist" % src)
|
fail_json(msg="Source (%s) does not exist" % src)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue