diff --git a/fetch b/fetch index f26337a490a..9132aeebbed 100755 --- a/fetch +++ b/fetch @@ -1,24 +1 @@ -#!/usr/bin/python - -# (c) 2012, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . -# - -### THIS FILE IS FOR REFERENCE OR FUTURE USE ### - -# See lib/ansible/runner.py for implementation of the fetch functionality # - +# this is a virtual module that is entirely implemented server side diff --git a/raw b/raw index adedd46d9c0..9132aeebbed 100755 --- a/raw +++ b/raw @@ -1,23 +1 @@ -#!/usr/bin/python - -# (c) 2012, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . - -# hey the Ansible raw module isn't really a remote transferred -# module. All the magic happens in Runner.py, see the web docs -# for more details. - +# this is a virtual module that is entirely implemented server side diff --git a/setup b/setup index 4cc343b7b9c..70bb5172c49 100755 --- a/setup +++ b/setup @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . -DEFAULT_ANSIBLE_SETUP = "/etc/ansible/setup" - import array import fcntl import glob @@ -33,11 +31,6 @@ import subprocess import traceback import syslog -try: - from hashlib import md5 as _md5 -except ImportError: - from md5 import md5 as _md5 - try: import selinux HAVE_SELINUX=True @@ -316,20 +309,6 @@ def ansible_facts(): get_service_facts(facts) return facts -def md5(filename): - ''' Return MD5 hex digest of local file, or None if file is not present. ''' - if not os.path.exists(filename): - return None - digest = _md5() - blocksize = 64 * 1024 - infile = open(filename, 'rb') - block = infile.read(blocksize) - while block: - digest.update(block) - block = infile.read(blocksize) - infile.close() - return digest.hexdigest() - # =========================================== # load config & template variables @@ -355,21 +334,6 @@ except: syslog.openlog('ansible-%s' % os.path.basename(__file__)) syslog.syslog(syslog.LOG_NOTICE, 'Invoked with %s' % setup_options) -ansible_file = os.path.expandvars(setup_options.get('metadata', DEFAULT_ANSIBLE_SETUP)) -ansible_dir = os.path.dirname(ansible_file) - -# create the config dir if it doesn't exist - -if not os.path.exists(ansible_dir): - os.makedirs(ansible_dir) - -changed = False -md5sum = None -if not os.path.exists(ansible_file): - changed = True -else: - md5sum = md5(ansible_file) - # Get some basic facts in case facter or ohai are not installed for (k, v) in ansible_facts().items(): setup_options["ansible_%s" % k] = v @@ -409,23 +373,7 @@ if os.path.exists("/usr/bin/ohai"): k2 = "ohai_%s" % k setup_options[k2] = v -# write the template/settings file using -# instructions from server - -f = open(ansible_file, "w+") -reformat = json.dumps(setup_options, sort_keys=True, indent=4) -f.write(reformat) -f.close() - -md5sum2 = md5(ansible_file) - -if md5sum != md5sum2: - changed = True - setup_result = {} -setup_result['written'] = ansible_file -setup_result['changed'] = changed -setup_result['md5sum'] = md5sum2 setup_result['ansible_facts'] = setup_options # hack to keep --verbose from showing all the setup module results diff --git a/shell b/shell index 345deea68f7..3c8e63d4f4b 100644 --- a/shell +++ b/shell @@ -1,6 +1,3 @@ -# VIRTUAL - -There is actually no actual shell module source, when you use 'shell' in ansible, -it runs the 'command' module with special arguments and it behaves differently. -See the command source and the comment "#USE_SHELL". - +# There is actually no actual shell module source, when you use 'shell' in ansible, +# it runs the 'command' module with special arguments and it behaves differently. +# See the command source and the comment "#USE_SHELL". diff --git a/template b/template index a290899c5ca..9132aeebbed 100755 --- a/template +++ b/template @@ -1,24 +1 @@ -#!/usr/bin/python - -# (c) 2012, Michael DeHaan -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . - -# hey the Ansible template module isn't really a remote transferred -# module. All the magic happens in Runner.py making use of the -# copy module, and if not running from a playbook, also the 'slurp' -# module. - +# this is a virtual module that is entirely implemented server side