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