#26 update package command to not use items
Merged 6 months ago by pingou. Opened 6 months ago by abompard.
Fedora-Infra/ abompard/ansible fix-with-items  into  master

@@ -3,9 +3,10 @@ 

  

  ## Install packages

  - name: Install needed packages

-   package: name={{ item }} state=present

-   with_items:

-   - python-bugzilla

+   package:

+     state: present

+     name:

+     - python-bugzilla

    tags:

    - packages

  

file modified
+9 -8

@@ -2,14 +2,15 @@ 

  # Configuration for the fedocal webapp

  

  - name: install needed packages

-   package: name={{ item }} state=present

-   with_items:

-   - fedocal

-   - python-psycopg2

-   - python-openid-cla

-   - python-openid-teams

-   - python-memcached

-   - libsemanage-python

+   package:

+     state: present

+     name:

+     - fedocal

+     - python-psycopg2

+     - python-openid-cla

+     - python-openid-teams

+     - python-memcached

+     - libsemanage-python

    tags:

    - packages

  

@@ -1,20 +1,22 @@ 

  - name: Install needed packages

-   package: name={{ item }} state=present

-   with_items:

-   - babel

-   - git

-   - python-feedparser

-   - python-genshi

-   - python-setuptools

-   - zanata-python-client

+   package:

+     state: present

+     name:

+     - babel

+     - git

+     - python-feedparser

+     - python-genshi

+     - python-setuptools

+     - zanata-python-client

    tags:

    - packages

    - fedora-web

  

  - name: Install extra packages for staging

-   package: name={{ item }} state=present

-   with_items:

-   - python-dogpile-cache

+   package:

+     state: present

+     name:

+     - python-dogpile-cache

    tags:

    - packages

    - fedora-web

@@ -2,9 +2,10 @@ 

  # Tasklist for setting up freemedia cgi.

  

  - name: install needed php packages

-   package: name={{ item }} state=present

-   with_items:

-   - php

+   package:

+     state: present

+     name:

+     - php

    notify:

    - reload httpd

    tags:

@@ -2,20 +2,23 @@ 

  # tasklist for setting up git mail hooks

  

  - name: install needed packages

-   package: name={{item}} state=present

-   with_items:

-   - git

-   - moreutils

-   - python-kitchen

+   package:

+     state: present

+     name:

+     - git

+     - moreutils

+     - python-kitchen

    tags:

    - git

    - git/hooks

    - packages

  

  - name: install needed packages from epel testing

-   package: name={{item}} state=present enablerepo=epel-testing

-   with_items:

-   - python-pygit2

+   yum:

+     state: present

+     enablerepo: epel-testing

+     name:

+     - python-pygit2

    tags:

    - git

    - git/hooks

@@ -2,12 +2,13 @@ 

  # Common configuration for the Module Build Service (MBS) pieces

  

  - name: install needed packages

-   package: name={{ item }} state=present

-   with_items:

-   - module-build-service

-   - python-psycopg2

-   - libsemanage-python

-   - python-memcached

+   package:

+     state: present

+     name:

+     - module-build-service

+     - python-psycopg2

+     - libsemanage-python

+     - python-memcached

    notify:

    - restart apache

    - restart fedmsg-hub

@@ -22,41 +22,43 @@ 

  

  ## Install the initial packages for the group.

  - name: Install nagios packages

-   package: name={{ item }} state=present

-   with_items:

-   - php

-   - nagios.x86_64

-   - nagios-selinux

-   - nrpe-selinux

-   - nagios-plugins

-   - nagios-plugins-dig

-   - nagios-plugins-disk

-   - nagios-plugins-dns

-   - nagios-plugins-dummy

-   - nagios-plugins-file_age

-   - nagios-plugins-http

-   - nagios-plugins-load

-   - nagios-plugins-nagios

-   - nagios-plugins-nrpe

-   - nagios-plugins-perl

-   - nagios-plugins-pgsql

-   - nagios-plugins-ping

-   - nagios-plugins-procs

-   - nagios-plugins-smtp

-   - nagios-plugins-ssh

-   - nagios-plugins-swap

-   - nagios-plugins-tcp

-   - nagios-plugins-users

-   - perl-Mail-IMAPClient

-   - stunnel

-   - mod_auth_gssapi

-   tags:

-   - nagios_server

- 

+   package:

+     state: present

+     name:

+     - php

+     - nagios.x86_64

+     - nagios-selinux

+     - nrpe-selinux

+     - nagios-plugins

+     - nagios-plugins-dig

+     - nagios-plugins-disk

+     - nagios-plugins-dns

+     - nagios-plugins-dummy

+     - nagios-plugins-file_age

+     - nagios-plugins-http

+     - nagios-plugins-load

+     - nagios-plugins-nagios

+     - nagios-plugins-nrpe

+     - nagios-plugins-perl

+     - nagios-plugins-pgsql

+     - nagios-plugins-ping

+     - nagios-plugins-procs

+     - nagios-plugins-smtp

+     - nagios-plugins-ssh

+     - nagios-plugins-swap

+     - nagios-plugins-tcp

+     - nagios-plugins-users

+     - perl-Mail-IMAPClient

+     - stunnel

+     - mod_auth_gssapi

+   tags:

+   - nagios_server

+   

  - name: Install the SSL apache module

-   package: name={{ item }} state=present

-   with_items:

-   - mod_ssl

+   package:

+     state: present

+     name:

+     - mod_ssl

    when: env == "production" and nagios_location == "external"

  

  

@@ -8,10 +8,11 @@ 

    - yumrepos

  

  - name: install needed packages

-   package: name={{ item }} state=present

-   with_items:

-   - rabbitmq-server

-   - nagios-plugins-rabbitmq

+   package:

+     state: present

+     name:

+     - rabbitmq-server

+     - nagios-plugins-rabbitmq

    tags:

    - rabbitmq_cluster

    - packages