mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-15 10:10:03 -03:30
Merge pull request #705 from vwfs/centos7-azure
Better support for CentOS 7 on Azure
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
---
|
||||
|
||||
# Running growpart seems to be only required on Azure, as other Cloud Providers do this at boot time
|
||||
|
||||
- name: install growpart
|
||||
package: name=cloud-utils-growpart state=latest
|
||||
|
||||
- name: check if growpart needs to be run
|
||||
command: growpart -N /dev/sda 1
|
||||
failed_when: False
|
||||
changed_when: "'NOCHANGE:' not in growpart_needed.stdout"
|
||||
register: growpart_needed
|
||||
|
||||
- name: check fs type
|
||||
command: file -Ls /dev/sda1
|
||||
changed_when: False
|
||||
register: fs_type
|
||||
|
||||
- name: run growpart
|
||||
command: growpart /dev/sda 1
|
||||
when: growpart_needed.changed
|
||||
|
||||
- name: run xfs_growfs
|
||||
command: xfs_growfs /dev/sda1
|
||||
when: growpart_needed.changed and 'XFS' in fs_type.stdout
|
||||
@@ -180,3 +180,15 @@
|
||||
|
||||
- include: resolvconf.yml
|
||||
tags: [bootstrap-os, resolvconf]
|
||||
|
||||
- name: Check if we are running inside a Azure VM
|
||||
stat: path=/var/lib/waagent/
|
||||
register: azure_check
|
||||
tags: bootstrap-os
|
||||
|
||||
- include: growpart-azure-centos-7.yml
|
||||
when: azure_check.stat.exists and
|
||||
ansible_distribution in ["CentOS","RedHat"] and
|
||||
ansible_distribution_major_version >= 7
|
||||
tags: bootstrap-os
|
||||
|
||||
|
||||
Reference in New Issue
Block a user