#3 Convert from dnf/with_items to package/name.
Merged 4 years ago by pingou. Opened 4 years ago by james.
fedora-infra/ james/ansible james  into  master

file modified
+7 -17
@@ -1,25 +1,15 @@ 

  ---

  # install apache(httpd)

- - name: install apache (yum)

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

-   with_items:

-   - httpd

-   - httpd-tools

+ - name: install apache (package)

+   package:

+     state: present

+     name:

+     - httpd

+     - httpd-tools

    tags:

    - packages

    - apache

-   when: ansible_distribution_major_version|int < 22

- 

- # install apache(httpd)

- - name: install apache (dnf)

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

-   with_items:

-   - httpd

-   - httpd-tools

-   tags:

-   - packages

-   - apache

-   when: ansible_distribution_major_version|int > 21 and ansible_cmdline.ostree is not defined

+   when: ansible_cmdline.ostree is not defined

  

  - name: set apache running/enabled

    service: name=httpd enabled=yes

@@ -2,17 +2,18 @@ 

  # Configuration for the Fedora Notifications webapp

  

  - name: install needed packages

-   dnf: pkg={{ item }} state=present

-   with_items:

-   - autocloud-common

-   - autocloud-backend

-   - tunir

-   - fedfind

-   - python2-fedfind

-   - python-sqlalchemy

-   - python-sqlalchemy-utils

-   - libsemanage-python

-   - libselinux-python

+   package:

+     state: present

+     name:

+     - autocloud-common

+     - autocloud-backend

+     - tunir

+     - fedfind

+     - python2-fedfind

+     - python-sqlalchemy

+     - python-sqlalchemy-utils

+     - libsemanage-python

+     - libselinux-python

    notify:

    - restart fedmsg-hub

    - restart autocloud
@@ -57,10 +58,11 @@ 

    - autocloud/backend

  

  - name: install libvirt and vagrant-libvirt for the libvirt host

-   dnf: pkg={{ item }} state=present

-   with_items:

-   - libvirt

-   - vagrant-libvirt

+   package:

+     state: present

+     name:

+     - libvirt

+     - vagrant-libvirt

    when: autocloud_specialization == 'libvirt'

    notify:

    - restart fedmsg-hub
@@ -70,9 +72,10 @@ 

    - autocloud/backend

  

  - name: install libvirt for the aarch64 host

-   dnf: pkg={{ item }} state=present

-   with_items:

-   - libvirt

+   package:

+     state: present

+     name:

+     - libvirt

    when: autocloud_specialization == 'aarch64'

    notify:

    - restart fedmsg-hub
@@ -90,12 +93,13 @@ 

    - autocloud/backend

  

  - name: install virtualbox basics where needed

-   dnf: pkg={{ item }} state=present

-   with_items:

-   - VirtualBox-4.3

-   - kernel-devel

-   - gcc

-   - vagrant

+     package:

+     state: present

+     name:

+     - VirtualBox-4.3

+     - kernel-devel

+     - gcc

+     - vagrant

    register: virtualbox_installed

    check_mode: no

    when: autocloud_specialization == 'virtualbox' and inventory_hostname == 'autocloud-libvirt-vbox.phx2.fedoraproject.org'
@@ -107,12 +111,13 @@ 

    - autocloud/backend

  

  - name: install virtualbox basics where needed

-   dnf: pkg={{ item }} state=present

-   with_items:

-   - VirtualBox-5.1

-   - kernel-devel

-   - gcc

-   - vagrant

+   package:

+     state: present

+     name:

+     - VirtualBox-5.1

+     - kernel-devel

+     - gcc

+     - vagrant

    register: virtualbox_installed

    check_mode: no

    when: autocloud_specialization == 'virtualbox' and inventory_hostname == 'autocloud-libvirt-vbox2.phx2.fedoraproject.org'

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

  # Configuration for the Fedora Notifications webapp

  

  - name: install needed packages

-   dnf: pkg={{ item }} state=present

-   with_items:

-   - autocloud-common

-   - autocloud-web

-   - python-sqlalchemy

-   - python-sqlalchemy-utils

-   - python2-flask-restless

-   - libsemanage-python

+   package:

+     state: present

+     name:

+     - autocloud-common

+     - autocloud-web

+     - python-sqlalchemy

+     - python-sqlalchemy-utils

+     - python2-flask-restless

+     - libsemanage-python

    notify:

    - restart apache

    tags:

file modified
+3 -2
@@ -1,7 +1,8 @@ 

  ---

  - name: add pkgs for bkernel boxes

-   dnf: state=present pkg={{ item }}

-   with_items:

+   package:

+     state: present

+     name:

      - pesign

      - ccid

      - pcsc-lite

@@ -3,11 +3,12 @@ 

  # This is the base set of files needed for fedmsg

  

  - name: install needed packages

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

-   with_items:

-   - libsemanage-python

-   - python-psutil

-   - policycoreutils-python  # This is in the kickstart now.  Here for old hosts.

+   package:

+     state: present

+     name:

+     - libsemanage-python

+     - python-psutil

+     - policycoreutils-python  # This is in the kickstart now.  Here for old hosts.

    tags:

    - packages

    - fedmsg/base

no initial comment

Diff is fine but could you prefix the commit message with the app it concerns?

rebased onto 266d19da39b7c93ff78608f17e5c3f8e7a6049b8

4 years ago

rebased onto fc0ae20

4 years ago

rebased onto fc0ae20

4 years ago

Pull-Request has been merged by pingou

4 years ago