mirror of https://github.com/ceph/ceph-ansible.git
lint: do not use 'local_action'
Fix ansible-lint 504 error:
[504] Do not use 'local_action', use 'delegate_to: localhost'
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit c948b668eb
)
pull/6166/head
parent
ace031e86e
commit
8a8a082693
|
@ -15,13 +15,13 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: create a temp directory
|
- name: create a temp directory
|
||||||
local_action:
|
tempfile:
|
||||||
module: tempfile
|
|
||||||
state: directory
|
state: directory
|
||||||
prefix: ceph_ansible
|
prefix: ceph_ansible
|
||||||
run_once: true
|
run_once: true
|
||||||
register: localtempfile
|
register: localtempfile
|
||||||
become: false
|
become: false
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: set_fact lookup_ceph_config - lookup keys, conf and logs
|
- name: set_fact lookup_ceph_config - lookup keys, conf and logs
|
||||||
find:
|
find:
|
||||||
|
|
|
@ -366,13 +366,13 @@
|
||||||
|
|
||||||
- name: wait for server to boot
|
- name: wait for server to boot
|
||||||
become: false
|
become: false
|
||||||
local_action:
|
wait_for:
|
||||||
module: wait_for
|
|
||||||
port: 22
|
port: 22
|
||||||
host: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
|
host: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
|
||||||
state: started
|
state: started
|
||||||
delay: 10
|
delay: 10
|
||||||
timeout: 500
|
timeout: 500
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: remove data
|
- name: remove data
|
||||||
shell: rm -rf /var/lib/ceph/*
|
shell: rm -rf /var/lib/ceph/*
|
||||||
|
@ -444,9 +444,8 @@
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: is reboot needed
|
- name: is reboot needed
|
||||||
local_action:
|
command: echo requesting reboot
|
||||||
module: command
|
delegate_to: localhost
|
||||||
echo requesting reboot
|
|
||||||
become: false
|
become: false
|
||||||
notify:
|
notify:
|
||||||
- restart machine
|
- restart machine
|
||||||
|
@ -824,10 +823,9 @@
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: request data removal
|
- name: request data removal
|
||||||
local_action:
|
command: echo requesting data removal # noqa 301
|
||||||
module: command
|
|
||||||
echo requesting data removal # noqa 301
|
|
||||||
become: false
|
become: false
|
||||||
|
delegate_to: localhost
|
||||||
notify: remove data
|
notify: remove data
|
||||||
|
|
||||||
- name: purge dnf cache
|
- name: purge dnf cache
|
||||||
|
|
Loading…
Reference in New Issue