diff options
-rwxr-xr-x | certs/gencerts.sh | 2 | ||||
-rw-r--r-- | lib/action_plugins/fetch_cmd.py | 2 | ||||
-rw-r--r-- | lib/modules/mysql_user2 | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/certs/gencerts.sh b/certs/gencerts.sh index bb5650d..f56e8f7 100755 --- a/certs/gencerts.sh +++ b/certs/gencerts.sh @@ -157,24 +157,24 @@ Authority](https://letsencrypt.org), and are submitted to [Certificate Transparency logs](https://www.certificate-transparency.org). You can view all issued Let's Encrypt certificates at [crt.sh](https://crt.sh/?Identity=%25fripost.org&iCAID=16418). The SPKI of our X.509 certificates are also available in PEM format under our [Git repository]($VCS_BROWSER/tree/certs/public), from which this fingerprint list was [generated]($VCS_BROWSER/tree/certs/gencerts.sh), at $(git --no-pager --git-dir="$DIR/../../.git" --work-tree="$DIR" log -1 --pretty=format:"[Commit ID %h from %aD]($VCS_BROWSER/tree/certs/public?id=%H)" -- "$DIR"). EOF allfpr mdwn >>"$mdwn2" echo >>"$src2" if diff -u --color=auto --label "a/${asc%.asc}" --label "b/${asc%.asc}" -- "$src" "$src2" && diff -q -- "$mdwn" "$mdwn2" >/dev/null; then echo 'The fingerprint list is up to date.' else "$GPG" $GPG_OPTS --output="$asc2" --clearsign -- "$src2" cp -f "$asc2" "$asc" cp -f "$mdwn2" "$mdwn" - echo ================================ + echo ================================ echo "The fingerprint lists ($asc and $mdwn) have been updated!" echo '/!\ You should now push the changes to the wiki. /!\' fi diff --git a/lib/action_plugins/fetch_cmd.py b/lib/action_plugins/fetch_cmd.py index b460868..57d7220 100644 --- a/lib/action_plugins/fetch_cmd.py +++ b/lib/action_plugins/fetch_cmd.py @@ -33,30 +33,30 @@ class ActionModule(ActionBase): cmd = self._task.args.get('cmd', None) stdin = self._task.args.get('stdin', None) dest = self._task.args.get('dest', None) if cmd is None or dest is None: return dict(failed=True, msg="cmd and dest are required") if stdin is not None: stdin = self._connection._shell.join_path(stdin) stdin = self._remote_expand_user(stdin) remote_user = task_vars.get('ansible_ssh_user') or self._play_context.remote_user stdout = self._connection._shell.join_path(self._make_tmp_path(remote_user), 'stdout') result.update(self._execute_module(module_args=dict(cmd=cmd, stdin=stdin, dest=stdout), task_vars=task_vars)) # calculate checksum for the local file local_checksum = checksum(dest) # calculate checksum for the remote file, don't bother if using become as slurp will be used - remote_checksum = self._remote_checksum(stdout, all_vars=task_vars) + remote_checksum = self._remote_checksum(stdout, all_vars=task_vars) if remote_checksum != local_checksum: makedirs_safe(os.path.dirname(dest)) self._connection.fetch_file(stdout, dest) if checksum(dest) == remote_checksum: result.update(dict(changed=True)) else: result.update(dict(failed=True)) return result diff --git a/lib/modules/mysql_user2 b/lib/modules/mysql_user2 index c3cc38f..f2d9d40 100644 --- a/lib/modules/mysql_user2 +++ b/lib/modules/mysql_user2 @@ -338,41 +338,41 @@ def config_get(config, section, option): See: http://dev.mysql.com/doc/refman/5.0/en/option-files.html """ return strip_quotes(config.get(section, option)) def _safe_cnf_load(config, path): data = {'user':'', 'password':''} # read in user/pass f = open(path, 'r') for line in f.readlines(): line = line.strip() if line.startswith('user='): data['user'] = line.split('=', 1)[1].strip() if line.startswith('password=') or line.startswith('pass='): data['password'] = line.split('=', 1)[1].strip() f.close() - # write out a new cnf file with only user/pass + # write out a new cnf file with only user/pass fh, newpath = tempfile.mkstemp(prefix=path + '.') f = open(newpath, 'wb') f.write('[client]\n') f.write('user=%s\n' % data['user']) f.write('password=%s\n' % data['password']) f.close() config.readfp(open(newpath)) os.remove(newpath) return config def load_mycnf(): config = ConfigParser.RawConfigParser() mycnf = os.path.expanduser('~/.my.cnf') if not os.path.exists(mycnf): return False try: config.readfp(open(mycnf)) except (IOError): return False |