ansible-lint: Don't use the local_action module [E504] (#4666)

pull/4688/head
MarkusTeufelberger 2019-05-01 09:38:55 +02:00 committed by Kubernetes Prow Robot
parent e029a09345
commit e814da1eec
4 changed files with 11 additions and 6 deletions

View File

@ -12,5 +12,4 @@ skip_list:
- '404' - '404'
- '502' - '502'
- '503' - '503'
- '504'
- '701' - '701'

View File

@ -24,10 +24,10 @@
dest: "{{ inventory_path }}" dest: "{{ inventory_path }}"
- name: Wait until SSH is available - name: Wait until SSH is available
local_action: wait_for:
module: wait_for
host: "{{ item.public_ip }}" host: "{{ item.public_ip }}"
port: 22 port: 22
timeout: 300 timeout: 300
state: started state: started
delegate_to: localhost
with_items: "{{ec2.instances}}" with_items: "{{ec2.instances}}"

View File

@ -77,4 +77,10 @@
gather_facts: false gather_facts: false
tasks: tasks:
- name: Wait for SSH to come up. - name: Wait for SSH to come up.
local_action: wait_for host={{inventory_hostname}} port=22 delay=60 timeout=240 state=started wait_for:
host: "{{ inventory_hostname }}"
port: 22
delay: 60
timeout: 240
state: started
delegate_to: localhost

View File

@ -7,11 +7,11 @@
action: ec2_facts action: ec2_facts
- name: Terminate EC2 instances - name: Terminate EC2 instances
local_action: ec2:
module: ec2
aws_access_key: "{{ aws_access_key }}" aws_access_key: "{{ aws_access_key }}"
aws_secret_key: "{{ aws_secret_key }}" aws_secret_key: "{{ aws_secret_key }}"
state: absent state: absent
instance_ids: "{{ ansible_ec2_instance_id }}" instance_ids: "{{ ansible_ec2_instance_id }}"
region: "{{ ansible_ec2_placement_region }}" region: "{{ ansible_ec2_placement_region }}"
wait: True wait: True
delegate_to: localhost