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:
Andrew Greenwood
2017-02-17 16:22:34 -05:00
parent e16ebcad6e
commit ca9ea097df
45 changed files with 291 additions and 109 deletions

View File

@@ -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

View File

@@ -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"