Resolve ansible-lint ANSIBLE0008
ansible-lint 2.3.7 added a rule checking for use of the deprecated 'sudo' and 'sudo_user' directives. They have been replaced with 'become' and 'become_user' respectively. Change-Id: I2271fe8468840884f19f41abba37e696c6296350
This commit is contained in:
parent
b4bb5105b6
commit
c8630f72be
@ -38,8 +38,8 @@
|
|||||||
{{ rsync_flags }} \
|
{{ rsync_flags }} \
|
||||||
--files-from=/tmp/MANIFEST.in \
|
--files-from=/tmp/MANIFEST.in \
|
||||||
{{ repo_upstream_url | netloc }}::{{ mirror_name }} {{ mirror_path }}
|
{{ repo_upstream_url | netloc }}::{{ mirror_name }} {{ mirror_path }}
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ repo_service_user_name }}"
|
become_user: "{{ repo_service_user_name }}"
|
||||||
- name: Create sync directories
|
- name: Create sync directories
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
@ -52,8 +52,8 @@
|
|||||||
{{ rsync_flags }} \
|
{{ rsync_flags }} \
|
||||||
{{ repo_upstream_url | netloc }}::{{ mirror_name }}/{{ item }}/ {{ mirror_path }}/{{ item }}
|
{{ repo_upstream_url | netloc }}::{{ mirror_name }}/{{ item }}/ {{ mirror_path }}/{{ item }}
|
||||||
with_items: rsync_dirs
|
with_items: rsync_dirs
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ repo_service_user_name }}"
|
become_user: "{{ repo_service_user_name }}"
|
||||||
vars:
|
vars:
|
||||||
rsync_commands: rsync
|
rsync_commands: rsync
|
||||||
rsync_flags: "-avzlHAX"
|
rsync_flags: "-avzlHAX"
|
||||||
|
@ -41,8 +41,8 @@
|
|||||||
|
|
||||||
- name: Perform a cinder DB sync
|
- name: Perform a cinder DB sync
|
||||||
command: "{{ cinder_bin }}/cinder-manage db sync"
|
command: "{{ cinder_bin }}/cinder-manage db sync"
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ cinder_system_user_name }}"
|
become_user: "{{ cinder_system_user_name }}"
|
||||||
tags:
|
tags:
|
||||||
- cinder-db-sync
|
- cinder-db-sync
|
||||||
- cinder-setup
|
- cinder-setup
|
||||||
|
@ -41,8 +41,8 @@
|
|||||||
|
|
||||||
- name: Perform a Glance DB sync
|
- name: Perform a Glance DB sync
|
||||||
command: "{{ glance_bin }}/glance-manage db_sync"
|
command: "{{ glance_bin }}/glance-manage db_sync"
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ glance_system_user_name }}"
|
become_user: "{{ glance_system_user_name }}"
|
||||||
tags:
|
tags:
|
||||||
- glance-db-sync
|
- glance-db-sync
|
||||||
- glance-setup
|
- glance-setup
|
||||||
@ -50,8 +50,8 @@
|
|||||||
|
|
||||||
- name: Load glance metadata definitions
|
- name: Load glance metadata definitions
|
||||||
command: "{{ glance_bin }}/glance-manage db_load_metadefs {{ glance_etc_dir }}/metadefs"
|
command: "{{ glance_bin }}/glance-manage db_load_metadefs {{ glance_etc_dir }}/metadefs"
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ glance_system_user_name }}"
|
become_user: "{{ glance_system_user_name }}"
|
||||||
tags:
|
tags:
|
||||||
- glance-db-sync
|
- glance-db-sync
|
||||||
- glance-setup
|
- glance-setup
|
||||||
|
@ -41,8 +41,8 @@
|
|||||||
|
|
||||||
- name: Perform a heat DB sync
|
- name: Perform a heat DB sync
|
||||||
command: "{{ heat_bin }}/heat-manage db_sync"
|
command: "{{ heat_bin }}/heat-manage db_sync"
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ heat_system_user_name }}"
|
become_user: "{{ heat_system_user_name }}"
|
||||||
tags:
|
tags:
|
||||||
- heat-db-sync
|
- heat-db-sync
|
||||||
- heat-setup
|
- heat-setup
|
||||||
|
@ -41,8 +41,8 @@
|
|||||||
|
|
||||||
- name: Perform a horizon DB sync
|
- name: Perform a horizon DB sync
|
||||||
command: "{{ horizon_bin }}/horizon-manage.py syncdb --noinput"
|
command: "{{ horizon_bin }}/horizon-manage.py syncdb --noinput"
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ horizon_system_user_name }}"
|
become_user: "{{ horizon_system_user_name }}"
|
||||||
tags:
|
tags:
|
||||||
- horizon-db-setup
|
- horizon-db-setup
|
||||||
- horizon-db-sync
|
- horizon-db-sync
|
||||||
|
@ -70,8 +70,8 @@
|
|||||||
|
|
||||||
- name: Collect and compress static files
|
- name: Collect and compress static files
|
||||||
command: "{{ item }}"
|
command: "{{ item }}"
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ horizon_system_user_name }}"
|
become_user: "{{ horizon_system_user_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ horizon_bin }}/horizon-manage.py collectstatic --noinput"
|
- "{{ horizon_bin }}/horizon-manage.py collectstatic --noinput"
|
||||||
- "{{ horizon_bin }}/horizon-manage.py compress --force"
|
- "{{ horizon_bin }}/horizon-manage.py compress --force"
|
||||||
|
@ -41,8 +41,8 @@
|
|||||||
|
|
||||||
- name: Perform a Keystone DB sync
|
- name: Perform a Keystone DB sync
|
||||||
command: "{{ keystone_bin }}/keystone-manage db_sync"
|
command: "{{ keystone_bin }}/keystone-manage db_sync"
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ keystone_system_user_name }}"
|
become_user: "{{ keystone_system_user_name }}"
|
||||||
tags:
|
tags:
|
||||||
- keystone-db-setup
|
- keystone-db-setup
|
||||||
- keystone-db-sync
|
- keystone-db-sync
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
{{ keystone_bin }}/keystone-manage fernet_setup
|
{{ keystone_bin }}/keystone-manage fernet_setup
|
||||||
--keystone-user "{{ keystone_system_user_name }}"
|
--keystone-user "{{ keystone_system_user_name }}"
|
||||||
--keystone-group "{{ keystone_system_group_name }}"
|
--keystone-group "{{ keystone_system_group_name }}"
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ keystone_system_user_name }}"
|
become_user: "{{ keystone_system_user_name }}"
|
||||||
when: not _fernet_keys.stat.exists
|
when: not _fernet_keys.stat.exists
|
||||||
tags:
|
tags:
|
||||||
- keystone-setup
|
- keystone-setup
|
||||||
@ -38,8 +38,8 @@
|
|||||||
{{ keystone_bin }}/keystone-manage fernet_rotate
|
{{ keystone_bin }}/keystone-manage fernet_rotate
|
||||||
--keystone-user "{{ keystone_system_user_name }}"
|
--keystone-user "{{ keystone_system_user_name }}"
|
||||||
--keystone-group "{{ keystone_system_group_name }}"
|
--keystone-group "{{ keystone_system_group_name }}"
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ keystone_system_user_name }}"
|
become_user: "{{ keystone_system_user_name }}"
|
||||||
when: _fernet_keys.stat.exists
|
when: _fernet_keys.stat.exists
|
||||||
tags:
|
tags:
|
||||||
- keystone-fernet
|
- keystone-fernet
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
--delete \
|
--delete \
|
||||||
{{ keystone_fernet_tokens_key_repository }}/ \
|
{{ keystone_fernet_tokens_key_repository }}/ \
|
||||||
{{ keystone_system_user_name }}@{{ hostvars[item]['ansible_ssh_host'] }}:{{ keystone_fernet_tokens_key_repository }}/
|
{{ keystone_system_user_name }}@{{ hostvars[item]['ansible_ssh_host'] }}:{{ keystone_fernet_tokens_key_repository }}/
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ keystone_system_user_name }}"
|
become_user: "{{ keystone_system_user_name }}"
|
||||||
with_items: groups['keystone_all'][1:]
|
with_items: groups['keystone_all'][1:]
|
||||||
tags:
|
tags:
|
||||||
- keystone-fernet-distribute
|
- keystone-fernet-distribute
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
- name: Generate IdP metadata
|
- name: Generate IdP metadata
|
||||||
shell: |
|
shell: |
|
||||||
{{ keystone_bin }}/keystone-manage saml_idp_metadata > {{ keystone_idp.idp_metadata_path }}
|
{{ keystone_bin }}/keystone-manage saml_idp_metadata > {{ keystone_idp.idp_metadata_path }}
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ keystone_system_user_name }}"
|
become_user: "{{ keystone_system_user_name }}"
|
||||||
when: keystone_idp is defined
|
when: keystone_idp is defined
|
||||||
notify:
|
notify:
|
||||||
- Restart Apache
|
- Restart Apache
|
||||||
|
@ -62,8 +62,8 @@
|
|||||||
--config-file {{ neutron_db_config }}
|
--config-file {{ neutron_db_config }}
|
||||||
--config-file {{ neutron_db_plugin }}
|
--config-file {{ neutron_db_plugin }}
|
||||||
upgrade --expand
|
upgrade --expand
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ neutron_system_user_name }}"
|
become_user: "{{ neutron_system_user_name }}"
|
||||||
when:
|
when:
|
||||||
- (neutron_migrations is defined and neutron_migrations['run_expand']|bool)
|
- (neutron_migrations is defined and neutron_migrations['run_expand']|bool)
|
||||||
- neutron_plugin_type == 'ml2'
|
- neutron_plugin_type == 'ml2'
|
||||||
@ -89,8 +89,8 @@
|
|||||||
--config-file {{ neutron_db_config }}
|
--config-file {{ neutron_db_config }}
|
||||||
--config-file {{ neutron_db_plugin }}
|
--config-file {{ neutron_db_plugin }}
|
||||||
upgrade --contract
|
upgrade --contract
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ neutron_system_user_name }}"
|
become_user: "{{ neutron_system_user_name }}"
|
||||||
when:
|
when:
|
||||||
- (neutron_migrations is defined and neutron_migrations['run_contract']|bool)
|
- (neutron_migrations is defined and neutron_migrations['run_contract']|bool)
|
||||||
- neutron_plugin_type == 'ml2'
|
- neutron_plugin_type == 'ml2'
|
||||||
@ -107,8 +107,8 @@
|
|||||||
--config-file {{ neutron_db_config }}
|
--config-file {{ neutron_db_config }}
|
||||||
--config-file {{ neutron_db_plugin }}
|
--config-file {{ neutron_db_plugin }}
|
||||||
upgrade heads
|
upgrade heads
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ neutron_system_user_name }}"
|
become_user: "{{ neutron_system_user_name }}"
|
||||||
when:
|
when:
|
||||||
- neutron_plugin_type != 'ml2'
|
- neutron_plugin_type != 'ml2'
|
||||||
tags:
|
tags:
|
||||||
|
@ -41,8 +41,8 @@
|
|||||||
|
|
||||||
- name: Perform a Nova DB sync
|
- name: Perform a Nova DB sync
|
||||||
command: "{{ nova_bin }}/nova-manage db sync"
|
command: "{{ nova_bin }}/nova-manage db sync"
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ nova_system_user_name }}"
|
become_user: "{{ nova_system_user_name }}"
|
||||||
tags:
|
tags:
|
||||||
- nova-db-setup
|
- nova-db-setup
|
||||||
- nova-setup
|
- nova-setup
|
||||||
|
@ -56,8 +56,8 @@
|
|||||||
- account
|
- account
|
||||||
- container
|
- container
|
||||||
when: swift_managed_regions is not defined
|
when: swift_managed_regions is not defined
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ swift_system_user_name }}"
|
become_user: "{{ swift_system_user_name }}"
|
||||||
args:
|
args:
|
||||||
chdir: /etc/swift/ring_build_files/
|
chdir: /etc/swift/ring_build_files/
|
||||||
tags:
|
tags:
|
||||||
@ -69,8 +69,8 @@
|
|||||||
with_nested:
|
with_nested:
|
||||||
- [ 'account', 'container' ]
|
- [ 'account', 'container' ]
|
||||||
- swift_managed_regions | default([])
|
- swift_managed_regions | default([])
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ swift_system_user_name }}"
|
become_user: "{{ swift_system_user_name }}"
|
||||||
args:
|
args:
|
||||||
chdir: /etc/swift/ring_build_files/
|
chdir: /etc/swift/ring_build_files/
|
||||||
tags:
|
tags:
|
||||||
@ -82,8 +82,8 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- "{{ swift.storage_policies }}"
|
- "{{ swift.storage_policies }}"
|
||||||
when: swift_managed_regions is not defined
|
when: swift_managed_regions is not defined
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ swift_system_user_name }}"
|
become_user: "{{ swift_system_user_name }}"
|
||||||
args:
|
args:
|
||||||
chdir: /etc/swift/ring_build_files/
|
chdir: /etc/swift/ring_build_files/
|
||||||
tags:
|
tags:
|
||||||
@ -95,8 +95,8 @@
|
|||||||
with_nested:
|
with_nested:
|
||||||
- "{{ swift.storage_policies }}"
|
- "{{ swift.storage_policies }}"
|
||||||
- swift_managed_regions | default([])
|
- swift_managed_regions | default([])
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ swift_system_user_name }}"
|
become_user: "{{ swift_system_user_name }}"
|
||||||
args:
|
args:
|
||||||
chdir: /etc/swift/ring_build_files/
|
chdir: /etc/swift/ring_build_files/
|
||||||
tags:
|
tags:
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
dest: "/etc/swift/"
|
dest: "/etc/swift/"
|
||||||
set_remote_user: False
|
set_remote_user: False
|
||||||
delegate_to: "{{ groups['swift_hosts'][0] }}"
|
delegate_to: "{{ groups['swift_hosts'][0] }}"
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ swift_system_user_name }}"
|
become_user: "{{ swift_system_user_name }}"
|
||||||
tags:
|
tags:
|
||||||
- swift-get-rings
|
- swift-get-rings
|
||||||
|
|
||||||
@ -32,7 +32,7 @@
|
|||||||
dest: "/etc/swift/ring_build_files/"
|
dest: "/etc/swift/ring_build_files/"
|
||||||
set_remote_user: False
|
set_remote_user: False
|
||||||
delegate_to: "{{ groups['swift_hosts'][0] }}"
|
delegate_to: "{{ groups['swift_hosts'][0] }}"
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ swift_system_user_name }}"
|
become_user: "{{ swift_system_user_name }}"
|
||||||
tags:
|
tags:
|
||||||
- swift-get-rings
|
- swift-get-rings
|
||||||
|
@ -49,8 +49,8 @@
|
|||||||
- account
|
- account
|
||||||
- container
|
- container
|
||||||
when: swift_managed_regions is not defined
|
when: swift_managed_regions is not defined
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ swift_system_user_name }}"
|
become_user: "{{ swift_system_user_name }}"
|
||||||
args:
|
args:
|
||||||
chdir: /etc/swift/ring_build_files/
|
chdir: /etc/swift/ring_build_files/
|
||||||
tags:
|
tags:
|
||||||
@ -62,8 +62,8 @@
|
|||||||
with_nested:
|
with_nested:
|
||||||
- [ 'account', 'container' ]
|
- [ 'account', 'container' ]
|
||||||
- swift_managed_regions | default([])
|
- swift_managed_regions | default([])
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ swift_system_user_name }}"
|
become_user: "{{ swift_system_user_name }}"
|
||||||
args:
|
args:
|
||||||
chdir: /etc/swift/ring_build_files/
|
chdir: /etc/swift/ring_build_files/
|
||||||
tags:
|
tags:
|
||||||
@ -75,8 +75,8 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- "{{ swift.storage_policies }}"
|
- "{{ swift.storage_policies }}"
|
||||||
when: swift_managed_regions is not defined
|
when: swift_managed_regions is not defined
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ swift_system_user_name }}"
|
become_user: "{{ swift_system_user_name }}"
|
||||||
args:
|
args:
|
||||||
chdir: /etc/swift/ring_build_files/
|
chdir: /etc/swift/ring_build_files/
|
||||||
tags:
|
tags:
|
||||||
@ -88,8 +88,8 @@
|
|||||||
with_nested:
|
with_nested:
|
||||||
- "{{ swift.storage_policies }}"
|
- "{{ swift.storage_policies }}"
|
||||||
- swift_managed_regions | default([])
|
- swift_managed_regions | default([])
|
||||||
sudo: yes
|
become: yes
|
||||||
sudo_user: "{{ swift_system_user_name }}"
|
become_user: "{{ swift_system_user_name }}"
|
||||||
args:
|
args:
|
||||||
chdir: /etc/swift/ring_build_files/
|
chdir: /etc/swift/ring_build_files/
|
||||||
tags:
|
tags:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
ansible-lint>=2.0.3,<2.3.8
|
ansible-lint>=2.0.3
|
||||||
flake8==2.2.4
|
flake8==2.2.4
|
||||||
hacking>=0.10.0,<0.11
|
hacking>=0.10.0,<0.11
|
||||||
pep8==1.5.7
|
pep8==1.5.7
|
||||||
|
2
tox.ini
2
tox.ini
@ -69,7 +69,7 @@ commands =
|
|||||||
[testenv:ansible-lint]
|
[testenv:ansible-lint]
|
||||||
deps =
|
deps =
|
||||||
ansible>1.9,<2.0
|
ansible>1.9,<2.0
|
||||||
ansible-lint>=2.0.3,<2.3.8
|
ansible-lint
|
||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
commands =
|
commands =
|
||||||
# Perform an Ansible lint check
|
# Perform an Ansible lint check
|
||||||
|
Loading…
Reference in New Issue
Block a user