Skip to content

Commit

Permalink
Make growpart only run on Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
codablock committed Dec 12, 2016
1 parent 42ea4d2 commit 5176e5c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---

# 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

Expand Down
10 changes: 8 additions & 2 deletions roles/kubernetes/preinstall/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,14 @@
- include: resolvconf.yml
tags: [bootstrap-os, resolvconf]

- include: growpart-centos-7.yml
when: ansible_distribution in ["CentOS","RedHat"] and
- 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

0 comments on commit 5176e5c

Please sign in to comment.