Replace Unicode no-break spaces with ASCII spaces

pull/82557/head
Matt Clay 7 months ago
parent 4aa109897f
commit 30169c76de

@ -141,7 +141,7 @@ from ansible.module_utils.compat.version import LooseVersion
class Subversion(object): class Subversion(object):
# Example text matched by the regexp: # Example text matched by the regexp:
# Révision : 1889134 # Révision : 1889134
# 版本: 1889134 # 版本: 1889134
# Revision: 1889134 # Revision: 1889134
REVISION_RE = r'^\w+\s?:\s+\d+$' REVISION_RE = r'^\w+\s?:\s+\d+$'

@ -2,13 +2,13 @@
# checks that dest is created # checks that dest is created
- name: Ensure that dest top directory doesn't exist - name: Ensure that dest top directory doesn't exist
file: file:
path: '{{ remote_dir }}/{{ item.dest.split("/")[0] }}' path: '{{ remote_dir }}/{{ item.dest.split("/")[0] }}'
state: absent state: absent
- name: Copy file, dest is a nonexistent target directory - name: Copy file, dest is a nonexistent target directory
copy: copy:
src: '{{ item.src }}' src: '{{ item.src }}'
dest: '{{ remote_dir }}/{{ item.dest }}' dest: '{{ remote_dir }}/{{ item.dest }}'
register: copy_result register: copy_result
- name: assert copy worked - name: assert copy worked

@ -2,7 +2,7 @@
# checks that dest is created # checks that dest is created
- name: Ensure that dest top directory doesn't exist - name: Ensure that dest top directory doesn't exist
file: file:
path: '{{ remote_dir }}/{{ item.dest.split("/")[0] }}' path: '{{ remote_dir }}/{{ item.dest.split("/")[0] }}'
state: absent state: absent
- name: create subdir - name: create subdir
@ -20,8 +20,8 @@
- name: Copy file, dest is a nonexistent target directory - name: Copy file, dest is a nonexistent target directory
copy: copy:
src: '{{ item.src }}' src: '{{ item.src }}'
dest: '{{ remote_dir }}/{{ item.dest }}' dest: '{{ remote_dir }}/{{ item.dest }}'
remote_src: true remote_src: true
register: copy_result register: copy_result

@ -1,6 +1,6 @@
- name: Ensure that dest top directory doesn't exist - name: Ensure that dest top directory doesn't exist
file: file:
path: '{{ remote_dir }}/{{ dest.split("/")[0] }}' path: '{{ remote_dir }}/{{ dest.split("/")[0] }}'
state: absent state: absent
- name: Copy file, dest is a file in non-existing target directory - name: Copy file, dest is a file in non-existing target directory
@ -17,7 +17,7 @@
- name: Stat dest path - name: Stat dest path
stat: stat:
path: '{{ remote_dir }}/{{ dest.split("/")[0] }}' path: '{{ remote_dir }}/{{ dest.split("/")[0] }}'
register: stat_file_in_dir_result register: stat_file_in_dir_result
- name: assert that dest doesn't exist - name: assert that dest doesn't exist

@ -1,6 +1,6 @@
- name: Ensure that dest top directory doesn't exist - name: Ensure that dest top directory doesn't exist
file: file:
path: '{{ remote_dir }}/{{ dest.split("/")[0] }}' path: '{{ remote_dir }}/{{ dest.split("/")[0] }}'
state: absent state: absent
- name: create src file - name: create src file
@ -23,7 +23,7 @@
- name: Stat dest path - name: Stat dest path
stat: stat:
path: '{{ remote_dir }}/{{ dest.split("/")[0] }}' path: '{{ remote_dir }}/{{ dest.split("/")[0] }}'
register: stat_file_in_dir_result register: stat_file_in_dir_result
- name: assert that dest doesn't exist - name: assert that dest doesn't exist

@ -999,13 +999,13 @@
- name: Create a directory outside of the tree - name: Create a directory outside of the tree
file: file:
path: '{{ local_temp_dir }}/source2' path: '{{ local_temp_dir }}/source2'
state: directory state: directory
- name: Create a symlink to a directory outside of the tree - name: Create a symlink to a directory outside of the tree
file: file:
path: '{{ local_temp_dir }}/source1/link' path: '{{ local_temp_dir }}/source1/link'
src: '{{ local_temp_dir }}/source2' src: '{{ local_temp_dir }}/source2'
state: link state: link
- name: Create a circular link back to the tree - name: Create a circular link back to the tree
@ -1075,7 +1075,7 @@
- name: Create a file inside of the directory - name: Create a file inside of the directory
copy: copy:
content: "testing" content: "testing"
dest: '{{ local_temp_dir }}/source_recursive/file' dest: '{{ local_temp_dir }}/source_recursive/file'
- name: Create a directory to place the test output in - name: Create a directory to place the test output in
file: file:
@ -1456,7 +1456,7 @@
block: block:
- name: Create a test dir to copy - name: Create a test dir to copy
file: file:
path: '{{ local_temp_dir }}/top_dir' path: '{{ local_temp_dir }}/top_dir'
state: directory state: directory
- name: Create a test dir to symlink to - name: Create a test dir to symlink to
@ -1466,7 +1466,7 @@
- name: Create a file in the test dir - name: Create a file in the test dir
copy: copy:
dest: '{{ local_temp_dir }}/linked_dir/file1' dest: '{{ local_temp_dir }}/linked_dir/file1'
content: 'hello world' content: 'hello world'
- name: Create a link to the test dir - name: Create a link to the test dir
@ -1489,7 +1489,7 @@
- name: Copy the directory's link - name: Copy the directory's link
copy: copy:
src: '{{ local_temp_dir }}/top_dir' src: '{{ local_temp_dir }}/top_dir'
dest: '{{ remote_dir }}/new_dir' dest: '{{ remote_dir }}/new_dir'
local_follow: True local_follow: True
@ -2056,7 +2056,7 @@
dest: '{{ remote_dir }}/testcase5_remote_src_subdirs_src' dest: '{{ remote_dir }}/testcase5_remote_src_subdirs_src'
- name: Create a 2nd level subdirectory - name: Create a 2nd level subdirectory
file: file:
path: '{{ remote_dir }}/testcase5_remote_src_subdirs_src/subdir/subdir2/' path: '{{ remote_dir }}/testcase5_remote_src_subdirs_src/subdir/subdir2/'
state: directory state: directory
- name: execute - Copy the directory on remote - name: execute - Copy the directory on remote
copy: copy:

@ -186,11 +186,11 @@
- name: Delete unprivileged user home and tempdir - name: Delete unprivileged user home and tempdir
file: file:
path: "{{ item }}" path: "{{ item }}"
state: absent state: absent
loop: loop:
- '{{ tempdir.path }}' - '{{ tempdir.path }}'
- '{{ user.home }}' - '{{ user.home }}'
- name: verify that link was created - name: verify that link was created
assert: assert:
@ -199,7 +199,7 @@
- "missing_dst_no_follow_enable_force_use_mode2 is changed" - "missing_dst_no_follow_enable_force_use_mode2 is changed"
- "missing_dst_no_follow_enable_force_use_mode3 is not changed" - "missing_dst_no_follow_enable_force_use_mode3 is not changed"
- "soft3_result['stat'].islnk" - "soft3_result['stat'].islnk"
- "soft3_result['stat'].lnk_target == '{{ user.home }}/nonexistent'" - "soft3_result['stat'].lnk_target == '{{ user.home }}/nonexistent'"
# #
# Test creating a link to a directory https://github.com/ansible/ansible/issues/1369 # Test creating a link to a directory https://github.com/ansible/ansible/issues/1369

@ -24,7 +24,7 @@
- name: "Check that run_once doesn't prevent fact gathering (#39453)" - name: "Check that run_once doesn't prevent fact gathering (#39453)"
assert: assert:
that: 'hostvars.facthost1.ansible_local.uuid != hostvars.facthost2.ansible_local.uuid' that: 'hostvars.facthost1.ansible_local.uuid != hostvars.facthost2.ansible_local.uuid'
msg: "{{ 'Same value for ansible_local.uuid on both hosts: ' ~ hostvars.facthost1.ansible_local.uuid }}" msg: "{{ 'Same value for ansible_local.uuid on both hosts: ' ~ hostvars.facthost1.ansible_local.uuid }}"
always: always:
- name: remove test local facts - name: remove test local facts
file: file:

@ -15,7 +15,7 @@
that: that:
- "testing == 789" - "testing == 789"
- "base_dir == 'environments/development'" - "base_dir == 'environments/development'"
- "{{ included_one_file.ansible_included_var_files | length }} == 1" - "{{ included_one_file.ansible_included_var_files | length }} == 1"
- "'vars/environments/development/all.yml' in included_one_file.ansible_included_var_files[0]" - "'vars/environments/development/all.yml' in included_one_file.ansible_included_var_files[0]"
- name: include the vars/environments/development/all.yml and save results in all - name: include the vars/environments/development/all.yml and save results in all
@ -67,7 +67,7 @@
- "testing == 456" - "testing == 456"
- "base_dir == 'services'" - "base_dir == 'services'"
- "webapp_containers == 10" - "webapp_containers == 10"
- "{{ include_every_dir.ansible_included_var_files | length }} == 7" - "{{ include_every_dir.ansible_included_var_files | length }} == 7"
- "'vars/all/all.yml' in include_every_dir.ansible_included_var_files[0]" - "'vars/all/all.yml' in include_every_dir.ansible_included_var_files[0]"
- "'vars/environments/development/all.yml' in include_every_dir.ansible_included_var_files[1]" - "'vars/environments/development/all.yml' in include_every_dir.ansible_included_var_files[1]"
- "'vars/environments/development/services/webapp.yml' in include_every_dir.ansible_included_var_files[2]" - "'vars/environments/development/services/webapp.yml' in include_every_dir.ansible_included_var_files[2]"
@ -88,7 +88,7 @@
that: that:
- "testing == 789" - "testing == 789"
- "base_dir == 'environments/development'" - "base_dir == 'environments/development'"
- "{{ include_without_webapp.ansible_included_var_files | length }} == 4" - "{{ include_without_webapp.ansible_included_var_files | length }} == 4"
- "'webapp.yml' not in '{{ include_without_webapp.ansible_included_var_files | join(' ') }}'" - "'webapp.yml' not in '{{ include_without_webapp.ansible_included_var_files | join(' ') }}'"
- "'file_without_extension' not in '{{ include_without_webapp.ansible_included_var_files | join(' ') }}'" - "'file_without_extension' not in '{{ include_without_webapp.ansible_included_var_files | join(' ') }}'"
@ -104,7 +104,7 @@
- "testing == 101112" - "testing == 101112"
- "base_dir == 'development/services'" - "base_dir == 'development/services'"
- "webapp_containers == 20" - "webapp_containers == 20"
- "{{ include_match_webapp.ansible_included_var_files | length }} == 1" - "{{ include_match_webapp.ansible_included_var_files | length }} == 1"
- "'vars/environments/development/services/webapp.yml' in include_match_webapp.ansible_included_var_files[0]" - "'vars/environments/development/services/webapp.yml' in include_match_webapp.ansible_included_var_files[0]"
- "'all.yml' not in '{{ include_match_webapp.ansible_included_var_files | join(' ') }}'" - "'all.yml' not in '{{ include_match_webapp.ansible_included_var_files | join(' ') }}'"

@ -46,7 +46,7 @@
msg: 'ansible_service_mgr: {{ ansible_service_mgr }}' msg: 'ansible_service_mgr: {{ ansible_service_mgr }}'
- name: setup test service script - name: setup test service script
include_tasks: '{{ service_type }}_setup.yml' include_tasks: '{{ service_type }}_setup.yml'
- name: execute tests - name: execute tests
import_tasks: tests.yml import_tasks: tests.yml

@ -11,7 +11,7 @@
loop: '{{ upstart_files }}' loop: '{{ upstart_files }}'
- name: assert that upstart init files were removed - name: assert that upstart init files were removed
raw: 'test -e {{ item }}' raw: 'test -e {{ item }}'
loop: '{{ upstart_files }}' loop: '{{ upstart_files }}'
register: file_exists register: file_exists
failed_when: file_exists is not failed failed_when: file_exists is not failed

Loading…
Cancel
Save