diff --git a/inventory/group_vars/all.yml b/inventory/group_vars/all.yml index 06561e78f..65b65fe39 100644 --- a/inventory/group_vars/all.yml +++ b/inventory/group_vars/all.yml @@ -1,4 +1,4 @@ -# Valid bootstrap options (required): ubuntu, coreos, none +# Valid bootstrap options (required): ubuntu, coreos, centos, none bootstrap_os: none # Directory where the binaries will be installed diff --git a/roles/bootstrap-os/tasks/bootstrap-centos.yml b/roles/bootstrap-os/tasks/bootstrap-centos.yml new file mode 100644 index 000000000..9c41ae84c --- /dev/null +++ b/roles/bootstrap-os/tasks/bootstrap-centos.yml @@ -0,0 +1,14 @@ +--- + +- name: Check presence of fastestmirror.conf + stat: path=/etc/yum/pluginconf.d/fastestmirror.conf + register: fastestmirror + +# fastestmirror plugin actually slows down Ansible deployments +- name: Disable fastestmirror plugin + lineinfile: + dest: /etc/yum/pluginconf.d/fastestmirror.conf + regexp: "^enabled=.*" + line: "enabled=0" + state: present + when: fastestmirror.stat.exists diff --git a/roles/bootstrap-os/tasks/main.yml b/roles/bootstrap-os/tasks/main.yml index a3ebeb8f2..7f1355577 100644 --- a/roles/bootstrap-os/tasks/main.yml +++ b/roles/bootstrap-os/tasks/main.yml @@ -5,4 +5,7 @@ - include: bootstrap-coreos.yml when: bootstrap_os == "coreos" -- include: setup-pipelining.yml +- include: bootstrap-centos.yml + when: bootstrap_os == "centos" + +- include: setup-pipelining.yml \ No newline at end of file