mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-21 21:20:15 -03:30
Cleanup legacy syntax, spacing, files all to yml
Migrate older inline= syntax to pure yml syntax for module args as to be consistant with most of the rest of the tasks Cleanup some spacing in various files Rename some files named yaml to yml for consistancy
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
---
|
||||
|
||||
- name: install ELRepo key
|
||||
rpm_key: state=present key='{{ elrepo_key_url }}'
|
||||
rpm_key:
|
||||
state: present
|
||||
key: '{{ elrepo_key_url }}'
|
||||
|
||||
- name: install elrepo repository
|
||||
yum:
|
||||
@@ -9,7 +11,10 @@
|
||||
state: present
|
||||
|
||||
- name: upgrade kernel
|
||||
yum: name={{elrepo_kernel_package}} state=present enablerepo=elrepo-kernel
|
||||
yum:
|
||||
name: "{{elrepo_kernel_package}}"
|
||||
state: present
|
||||
enablerepo: elrepo-kernel
|
||||
register: upgrade
|
||||
|
||||
- name: change default grub entry
|
||||
|
||||
@@ -8,23 +8,33 @@
|
||||
shell: nohup bash -c "sleep 5 && shutdown -r now 'Reboot required for updated kernel'" &
|
||||
|
||||
- name: Wait for some seconds
|
||||
pause: seconds=10
|
||||
pause:
|
||||
seconds: 10
|
||||
|
||||
- set_fact:
|
||||
is_bastion: "{{ inventory_hostname == 'bastion' }}"
|
||||
wait_for_delegate: "localhost"
|
||||
|
||||
- set_fact:
|
||||
wait_for_delegate: "{{hostvars['bastion']['ansible_ssh_host']}}"
|
||||
when: "{{ 'bastion' in groups['all'] }}"
|
||||
|
||||
- name: wait for bastion to come back
|
||||
wait_for: host={{ ansible_ssh_host }} port=22 delay=10 timeout=300
|
||||
wait_for:
|
||||
host: "{{ ansible_ssh_host }}"
|
||||
port: 22
|
||||
delay: 10
|
||||
timeout: 300
|
||||
become: false
|
||||
delegate_to: localhost
|
||||
when: "is_bastion"
|
||||
|
||||
- name: waiting for server to come back (using bastion if necessary)
|
||||
wait_for: host={{ ansible_ssh_host }} port=22 delay=10 timeout=300
|
||||
wait_for:
|
||||
host: "{{ ansible_ssh_host }}"
|
||||
port: 22
|
||||
delay: 10
|
||||
timeout: 300
|
||||
become: false
|
||||
delegate_to: "{{ wait_for_delegate }}"
|
||||
when: "not is_bastion"
|
||||
|
||||
Reference in New Issue
Block a user