# yum groupinstall "Development tools" for mutliple Linux-based OS

**URL:** <https://forum.ansible.com/t/yum-groupinstall-development-tools-for-mutliple-linux-based-os/22131>\
**Category:** Ansible Project\
**Tags:** fedora, ubuntu\
**Created:** [July 27, 2016, 5:47am UTC](https://forum.ansible.com/t/yum-groupinstall-development-tools-for-mutliple-linux-based-os/22131 "2016-07-27T05:47:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igor\_P](https://avatars.discourse-cdn.com/v4/letter/i/a587f6/32.png) [@Igor\_P](https://forum.ansible.com/u/Igor_P)\
**Post date:** [July 27, 2016, 5:47am UTC](https://forum.ansible.com/t/yum-groupinstall-development-tools-for-mutliple-linux-based-os/22131/1 "2016-07-27T05:47:44Z")

</div>

Hi,

I am new to Ansible and I am working a playbook that requires to have Development-tool installed on on CentOS based server. However, I was thinking about writing playbook that will be applicable to Debian-based OSs such as Ubuntu for example. What would be the module that can install Development-tools on both Fedora and Debian based systems?

This is what I currently have:

```auto
tasks:
  - name: Install Development Tools, git, curl, htop
    yum: name={{ item }} state=present update_cache=yes
    with_items:
      - "@development_tools"
      - git
      - curl
      - htop

```

Thanks for you help.

---

<div class="post-metadata">

**Author:** ![Mark\_Janssen](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Mark\_Janssen](https://forum.ansible.com/u/Mark_Janssen)\
**Post date:** [July 28, 2016, 10:58am UTC](https://forum.ansible.com/t/yum-groupinstall-development-tools-for-mutliple-linux-based-os/22131/2 "2016-07-28T10:58:49Z")

</div>

Add a conditional on your current task to only run on centos/redhat, something along the lines of:  
when: ansible\_os\_family == “RedHat”

And then make a second task:

```auto
tasks:
  - name: Install Development Tools, git, curl, htop
    apt: name={{ item }} state=present
    with_items:
      - build-essential
      - git
      - curl
      - htop

```

```auto
when: ansible_os_family == "Debian"

```

---

<div class="post-metadata">

**Author:** ![Mark\_Janssen](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Mark\_Janssen](https://forum.ansible.com/u/Mark_Janssen)\
**Post date:** [July 28, 2016, 11:01am UTC](https://forum.ansible.com/t/yum-groupinstall-development-tools-for-mutliple-linux-based-os/22131/3 "2016-07-28T11:01:10Z")

</div>

Or… use something like:

pkg: name="{{item}} state=installed  
with\_items:

- {{devtools}}

and then have devtools be a list of the relevant packages set in group\_vars or some included file based on OS
