Browse Source

replace "with_items" in apt modules

tags/10.0.0^2
Jérémy Lecour 9 months ago
committed by Jérémy Lecour
parent
commit
e04d881988
47 changed files with 343 additions and 424 deletions
  1. +3
    -4
      amavis/tasks/main.yml
  2. +11
    -13
      apache/tasks/main.yml
  3. +6
    -8
      apache/tasks/munin.yml
  4. +3
    -4
      bind/tasks/main.yml
  5. +14
    -15
      clamav/tasks/main.yml
  6. +11
    -14
      docker-host/tasks/main.yml
  7. +13
    -14
      dovecot/tasks/main.yml
  8. +3
    -4
      drbd/tasks/packages.yml
  9. +6
    -8
      evolinux-base/tasks/hardware.yml
  10. +57
    -66
      evolinux-base/tasks/packages.yml
  11. +8
    -10
      evolinux-base/tasks/postfix.yml
  12. +5
    -6
      evomaintenance/tasks/install_vendor_debian.yml
  13. +5
    -6
      evomaintenance/tasks/install_vendor_openbsd.yml
  14. +3
    -4
      haproxy/tasks/munin.yml
  15. +3
    -4
      java/tasks/oracle.yml
  16. +10
    -11
      kvm-host/tasks/packages.yml
  17. +9
    -10
      ldap/tasks/main.yml
  18. +4
    -5
      memcached/tasks/munin.yml
  19. +1
    -3
      minifirewall/tasks/install.yml
  20. +3
    -4
      mongodb/tasks/main_stretch.yml
  21. +5
    -6
      munin/tasks/main.yml
  22. +3
    -4
      mysql-oracle/tasks/munin.yml
  23. +4
    -7
      mysql-oracle/tasks/packages.yml
  24. +11
    -15
      mysql-oracle/tasks/utils.yml
  25. +3
    -4
      mysql/tasks/munin.yml
  26. +2
    -5
      mysql/tasks/packages_jessie.yml
  27. +4
    -7
      mysql/tasks/packages_stretch.yml
  28. +8
    -10
      mysql/tasks/utils.yml
  29. +7
    -8
      nagios-nrpe/tasks/main.yml
  30. +3
    -4
      nginx/tasks/main_minimal.yml
  31. +4
    -5
      nginx/tasks/munin_vhost.yml
  32. +6
    -7
      opendkim/tasks/main.yml
  33. +4
    -5
      packweb-apache/tasks/apache.yml
  34. +9
    -10
      php/tasks/main_buster.yml
  35. +22
    -22
      php/tasks/main_jessie.yml
  36. +10
    -10
      php/tasks/main_stretch.yml
  37. +2
    -6
      postfix/tasks/minimal.yml
  38. +6
    -9
      postfix/tasks/packmail.yml
  39. +1
    -3
      rabbitmq/tasks/main.yml
  40. +11
    -12
      rbenv/tasks/main.yml
  41. +4
    -6
      redis/tasks/main.yml
  42. +14
    -15
      redmine/tasks/packages.yml
  43. +3
    -4
      spamassasin/tasks/main.yml
  44. +3
    -4
      squid/tasks/main.yml
  45. +4
    -5
      tomcat/tasks/packages.yml
  46. +5
    -10
      webapps/evoadmin-web/tasks/packages.yml
  47. +7
    -8
      webapps/roundcube/tasks/main.yml

+ 3
- 4
amavis/tasks/main.yml View File

@@ -1,11 +1,10 @@
---
- name: install Amavis
apt:
name: "{{ item }}"
name:
- postgrey
- amavisd-new
state: present
with_items:
- postgrey
- amavisd-new
tags:
- amavis



+ 11
- 13
apache/tasks/main.yml View File

@@ -2,14 +2,13 @@

- name: packages are installed (Debian 9 or later)
apt:
name: '{{ item }}'
name:
- apache2
- libapache2-mpm-itk
- libapache2-mod-evasive
- apachetop
- libwww-perl
state: present
with_items:
- apache2
- libapache2-mpm-itk
- libapache2-mod-evasive
- apachetop
- libwww-perl
tags:
- apache
- packages
@@ -17,13 +16,12 @@

- name: packages are installed (jessie)
apt:
name: '{{ item }}'
name:
- apache2-mpm-itk
- libapache2-mod-evasive
- apachetop
- libwww-perl
state: present
with_items:
- apache2-mpm-itk
- libapache2-mod-evasive
- apachetop
- libwww-perl
tags:
- apache
- packages


+ 6
- 8
apache/tasks/munin.yml View File

@@ -2,11 +2,10 @@

- name: "Install munin-node and core plugins packages"
apt:
name: "{{ item }}"
name:
- munin-node
- munin-plugins-core
state: present
with_items:
- munin-node
- munin-plugins-core
tags:
- apache
- munin
@@ -27,11 +26,10 @@

- name: "Install fcgi packages for Munin graphs"
apt:
name: "{{ item }}"
name:
- libapache2-mod-fcgid
- libcgi-fast-perl
state: present
with_items:
- libapache2-mod-fcgid
- libcgi-fast-perl
notify: reload apache
tags:
- apache


+ 3
- 4
bind/tasks/main.yml View File

@@ -1,10 +1,9 @@
- name: package are installed
apt:
name: '{{ item }}'
name:
- bind9
- dnstop
state: present
with_items:
- bind9
- dnstop

- name: Set bind configuration for recursive server
template:


+ 14
- 15
clamav/tasks/main.yml View File

@@ -74,22 +74,21 @@

- name: install ClamAV
apt:
name: "{{ item }}"
name:
- clamav-daemon
- clamav
- clamdscan
- clamav-freshclam
- arc
- arj
- zoo
- pax
- bzip2
- cabextract
- rpm
- lzop
- razor
state: present
with_items:
- clamav-daemon
- clamav
- clamdscan
- clamav-freshclam
- arc
- arj
- zoo
- pax
- bzip2
- cabextract
- rpm
- lzop
- razor
tags:
- clamav



+ 11
- 14
docker-host/tasks/main.yml View File

@@ -2,22 +2,20 @@
---
- name: Remove older docker packages
apt:
name: '{{ item }}'
name:
- docker
- docker-engine
- docker.io
state: absent
with_items:
- docker
- docker-engine
- docker.io

- name: Install source requirements
apt:
name: '{{ item }}'
name:
- apt-transport-https
- ca-certificates
- gnupg2
state: present
update_cache: yes
with_items:
- apt-transport-https
- ca-certificates
- gnupg2

- name: Add Docker repository
apt_repository:
@@ -36,11 +34,10 @@

- name: Install docker and python-docker
apt:
name: "{{ item }}"
name:
- docker-ce
- python-docker
update_cache: yes
with_items:
- docker-ce
- python-docker

- name: Copy Docker daemon configuration file
template:


+ 13
- 14
dovecot/tasks/main.yml View File

@@ -1,13 +1,12 @@
- name: ensure packages are installed
apt:
name: '{{ item }}'
name:
- dovecot-ldap
- dovecot-imapd
- dovecot-pop3d
- dovecot-sieve
- dovecot-managesieved
state: present
with_items:
- dovecot-ldap
- dovecot-imapd
- dovecot-pop3d
- dovecot-sieve
- dovecot-managesieved
tags:
- dovecot

@@ -26,13 +25,13 @@
regexp: "^#*{{ item.key }}"
state: present
with_items:
- { key: 'hosts', value: '127.0.0.1' }
- { key: 'auth_bind', value: 'yes' }
- { key: 'ldap_version', value: 3 }
- { key: 'base', value: "{{ ldap_suffix }}" }
- { key: 'user_attrs', value: 'homeDirectory=home' }
- { key: 'user_filter', value: '(&(isActive=TRUE)(uid=%u))' }
- { key: 'pass_attrs', value: 'uid=user,userPassword=password' }
- { key: 'hosts', value: '127.0.0.1' }
- { key: 'auth_bind', value: 'yes' }
- { key: 'ldap_version', value: 3 }
- { key: 'base', value: "{{ ldap_suffix }}" }
- { key: 'user_attrs', value: 'homeDirectory=home' }
- { key: 'user_filter', value: '(&(isActive=TRUE)(uid=%u))' }
- { key: 'pass_attrs', value: 'uid=user,userPassword=password' }
when: ldap_suffix is defined
notify: reload dovecot
tags:


+ 3
- 4
drbd/tasks/packages.yml View File

@@ -1,9 +1,8 @@
- name: Install dependency
apt:
name: "{{ item }}"
with_items:
- drbd-utils
- lvm2
name:
- drbd-utils
- lvm2
tags:
- drbd



+ 6
- 8
evolinux-base/tasks/hardware.yml View File

@@ -46,11 +46,10 @@

- name: Install packages for HP hardware
apt:
name: "{{ item }}"
name:
- cciss-vol-status
- ssacli
state: present
with_items:
- cciss-vol-status
- ssacli

- name: Configure packages for HP hardware
template:
@@ -79,11 +78,10 @@

- name: Install packages for DELL/LSI hardware
apt:
name: "{{ item }}"
name:
- megacli
- megaclisas-status
allow_unauthenticated: yes
with_items:
- megacli
- megaclisas-status

- name: Configure packages for DELL/LSI hardware
template:


+ 57
- 66
evolinux-base/tasks/packages.yml View File

@@ -2,65 +2,61 @@

- name: Install/Update system tools
apt:
name: "{{ item }}"
with_items:
- locales
- sudo
- ntpdate
- lsb-release
- dnsutils
- pv
- apg
- conntrack
- logrotate
- bash-completion
- ssl-cert
- ca-certificates
- rename
name:
- locales
- sudo
- ntpdate
- lsb-release
- dnsutils
- pv
- apg
- conntrack
- logrotate
- bash-completion
- ssl-cert
- ca-certificates
- rename
when: evolinux_packages_system

- name: Install/Update diagnostic tools
apt:
name: "{{ item }}"
with_items:
- strace
- htop
- iftop
- iptraf
- ncdu
- iotop
- tcpdump
- mtr-tiny
- curl
- telnet
- traceroute
- man
name:
- strace
- htop
- iftop
- iptraf
- ncdu
- iotop
- tcpdump
- mtr-tiny
- curl
- telnet
- traceroute
- man
when: evolinux_packages_diagnostic

- name: Install/Update hardware tools
apt:
name: "{{ item }}"
with_items:
- hdparm
- smartmontools
- lm-sensors
name:
- hdparm
- smartmontools
- lm-sensors
when: evolinux_packages_hardware

- name: Install/Update common tools
apt:
name: "{{ item }}"
with_items:
- vim
- screen
- tmux
- mutt
- tree
- git
- subversion
- rsync
- bc
- pinentry-curses
- ncurses-term
name:
- vim
- screen
- tmux
- mutt
- tree
- git
- subversion
- rsync
- bc
- pinentry-curses
- ncurses-term
when: evolinux_packages_common

- name: Be sure that openntpd package is absent/purged
@@ -72,12 +68,11 @@

- name: Be sure locate/mlocate is absent/purged
apt:
name: "{{ item }}"
name:
- locate
- mlocate
state: absent
purge: yes
with_items:
- locate
- mlocate
when: evolinux_packages_purge_locate

- name: Install/Update serveur-base meta-package
@@ -88,22 +83,19 @@

- name: Install/Update packages for Stretch and later
apt:
name: "{{ item }}"
with_items:
- net-tools
name: net-tools
when:
- evolinux_packages_stretch
- ansible_distribution_major_version is version_compare('9', '>=')
- evolinux_packages_stretch
- ansible_distribution_major_version is version_compare('9', '>=')

- name: Install/Update packages for Buster and later
apt:
name: "{{ item }}"
with_items:
- spectre-meltdown-checker
- binutils
name:
- spectre-meltdown-checker
- binutils
when:
- evolinux_packages_buster
- ansible_distribution_major_version is version_compare('10', '>=')
- evolinux_packages_buster
- ansible_distribution_major_version is version_compare('10', '>=')

- name: Customize logcheck recipient
lineinfile:
@@ -114,11 +106,10 @@

- name: Deleting rpcbind and nfs-common
apt:
name: "{{ item }}"
name:
- rpcbind
- nfs-common
state: absent
with_items:
- rpcbind
- nfs-common
when: evolinux_packages_delete_nfs




+ 8
- 10
evolinux-base/tasks/postfix.yml View File

@@ -2,11 +2,10 @@

- name: Postfix packages are installed
apt:
name: "{{ item }}"
name:
- postfix
- mailgraph
state: present
with_items:
- postfix
- mailgraph
when: evolinux_postfix_packages
tags:
- packages
@@ -83,14 +82,13 @@

- name: exim4 is absent
apt:
name: "{{ item }}"
name:
- exim4
- exim4-base
- exim4-config
- exim4-daemon-light
purge: yes
state: absent
with_items:
- exim4
- exim4-base
- exim4-config
- exim4-daemon-light
when: evolinux_postfix_purge_exim
tags:
- packages


+ 5
- 6
evomaintenance/tasks/install_vendor_debian.yml View File

@@ -2,12 +2,11 @@

- name: Dependencies are installed
apt:
name: "{{ item }}"
name:
- postgresql-client
- sudo
- curl
state: present
with_items:
- postgresql-client
- sudo
- curl
tags:
- evomaintenance

@@ -38,7 +37,7 @@
with_items:
- { src: 'evomaintenance.sh', dest: '/usr/share/scripts/', mode: '0700' }
- { src: 'evomaintenance.tpl', dest: '/usr/share/scripts/', mode: '0600' }
tags:
tags:
- evomaintenance

- name: Configuration is installed


+ 5
- 6
evomaintenance/tasks/install_vendor_openbsd.yml View File

@@ -2,11 +2,10 @@

- name: Dependencies are installed
openbsd_pkg:
name: "{{ item }}"
name:
- postgresql-client
- curl
state: present
with_items:
- postgresql-client
- curl
tags:
- evomaintenance

@@ -32,7 +31,7 @@
with_items:
- { src: 'evomaintenance.sh', dest: '/usr/share/scripts/', mode: '0700' }
- { src: 'evomaintenance.tpl', dest: '/usr/share/scripts/', mode: '0600' }
tags:
tags:
- evomaintenance

- name: Configuration is installed
@@ -51,7 +50,7 @@
src: mailevomaintenance.sh.j2
dest: /usr/share/scripts/mailevomaintenance.sh
owner: root
group: wheel
group: wheel
mode: "0700"
tags:
- evomaintenance


+ 3
- 4
haproxy/tasks/munin.yml View File

@@ -1,11 +1,10 @@
---
- name: Install Munin plugin and dependencies
apt:
name: "{{ item }}"
name:
- munin-plugins-extra
- liblwp-useragent-determined-perl
state: present
with_items:
- munin-plugins-extra
- liblwp-useragent-determined-perl
tags:
- haproxy



+ 3
- 4
java/tasks/oracle.yml View File

@@ -1,11 +1,10 @@
---
- name: Install dependencies for build java package
apt:
name: "{{ item }}"
name:
- java-package
- build-essential
state: present
with_items:
- java-package
- build-essential
tags:
- java



+ 10
- 11
kvm-host/tasks/packages.yml View File

@@ -1,14 +1,13 @@
---
- name: Install packages for kvm/libvirt
apt:
name: "{{ item }}"
with_items:
- qemu-kvm
- netcat-openbsd
- bridge-utils
- qemu-utils
- virtinst
- libvirt-daemon-system
- libvirt-clients
- kvm-tools
- vlan
name:
- qemu-kvm
- netcat-openbsd
- bridge-utils
- qemu-utils
- virtinst
- libvirt-daemon-system
- libvirt-clients
- kvm-tools
- vlan

+ 9
- 10
ldap/tasks/main.yml View File

@@ -1,12 +1,11 @@
- name: LDAP packages are installed
apt:
name: '{{ item }}'
name:
- slapd
- ldap-utils
- ldapvi
- shelldap
state: present
with_items:
- slapd
- ldap-utils
- ldapvi
- shelldap

- name: change sldap listen ip:port
lineinfile:
@@ -68,10 +67,10 @@
value: "{{ item.value }}"
mode: 0640
with_items:
- { option: 'hostname', value: '127.0.0.1' }
- { option: 'base', value: "{{ ldap_suffix }}" }
- { option: 'bind', value: "cn=nagios,ou=ldapusers,{{ ldap_suffix }}" }
- { option: 'pass', value: "{{ ldap_nagios_password.stdout }}" }
- { option: 'hostname', value: '127.0.0.1' }
- { option: 'base', value: "{{ ldap_suffix }}" }
- { option: 'bind', value: "cn=nagios,ou=ldapusers,{{ ldap_suffix }}" }
- { option: 'pass', value: "{{ ldap_nagios_password.stdout }}" }

- name: upload ldap initial config
template:


+ 4
- 5
memcached/tasks/munin.yml View File

@@ -2,7 +2,7 @@
- name: Choose packages (Oracle)
set_fact:
multi: "multi_"
when: memcached_instance_name != False
when: memcached_instance_name

- name: is Munin present ?
stat:
@@ -16,11 +16,10 @@
- block:
- name: Install munin-plugins-extra and libcache-memcached-perl for Munin
apt:
name: "{{ item }}"
name:
- 'munin-plugins-extra'
- 'libcache-memcached-perl'
state: present
with_items:
- 'munin-plugins-extra'
- 'libcache-memcached-perl'

- name: Enable core Munin plugins
file:


+ 1
- 3
minifirewall/tasks/install.yml View File

@@ -2,10 +2,8 @@

- name: dependencies are satisfied
apt:
name: '{{ item }}'
name: iptables
state: present
with_items:
- iptables

- name: init script is copied
template:


+ 3
- 4
mongodb/tasks/main_stretch.yml View File

@@ -2,11 +2,10 @@

- name: Install packages
apt:
name: "{{ item }}"
name:
- mongodb
- mongo-tools
state: present
with_items:
- mongodb
- mongo-tools

- name: install dependency for monitoring
apt:


+ 5
- 6
munin/tasks/main.yml View File

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

- name: Ensure that Munin is installed
apt:
name: '{{ item }}'
name:
- munin
- munin-node
- munin-plugins-core
- munin-plugins-extra
state: present
with_items:
- munin
- munin-node
- munin-plugins-core
- munin-plugins-extra
tags:
- munin
- packages


+ 3
- 4
mysql-oracle/tasks/munin.yml View File

@@ -12,11 +12,10 @@
- block:
- name: Install perl libraries for Munin
apt:
name: "{{ item }}"
name:
- libdbd-mysql-perl
- libcache-cache-perl
state: present
with_items:
- libdbd-mysql-perl
- libcache-cache-perl

- name: Enable core Munin plugins
file:


+ 4
- 7
mysql-oracle/tasks/packages.yml View File

@@ -70,23 +70,20 @@

- name: Install MySQL packages
apt:
name: '{{ item }}'
name:
- mysql-server
- mysql-client
update_cache: yes
state: present
with_items:
- mysql-server
- mysql-client
tags:
- mysql
- packages

- name: Install MySQL dev packages
apt:
name: '{{ item }}'
name: libmysqlclient20
update_cache: yes
state: present
with_items:
- libmysqlclient20
tags:
- mysql
- packages


+ 11
- 15
mysql-oracle/tasks/utils.yml View File

@@ -26,20 +26,17 @@

# - name: "mysql-utilities are installed (Debian 9 or later)"
# apt:
# name: "{{ item }}"
# with_items:
# - mysql-utilities
# name: mysql-utilities
# when: ansible_distribution_major_version is version_compare('9', '>=')

- name: "mytop dependencies are installed (stretch)"
apt:
name: "{{ item }}"
with_items:
- libconfig-inifiles-perl
- libdbd-mysql-perl
- libdbi-perl
- libterm-readkey-perl
- libtime-hires-perl
name:
- libconfig-inifiles-perl
- libdbd-mysql-perl
- libdbi-perl
- libterm-readkey-perl
- libtime-hires-perl
tags:
- packages
- mytop
@@ -48,11 +45,10 @@

- name: "Install dependencies for mytop (Debian 10 or later)"
apt:
name: "{{ item }}"
with_items:
- mariadb-client-10.3
- libconfig-inifiles-perl
- libterm-readkey-perl
name:
- mariadb-client-10.3
- libconfig-inifiles-perl
- libterm-readkey-perl
when: ansible_distribution_major_version is version_compare('10', '>=')

- include_role:


+ 3
- 4
mysql/tasks/munin.yml View File

@@ -12,11 +12,10 @@
- block:
- name: Install perl libraries for Munin
apt:
name: "{{ item }}"
name:
- libdbd-mysql-perl
- libcache-cache-perl
state: present
with_items:
- libdbd-mysql-perl
- libcache-cache-perl

- name: Enable core Munin plugins
file:


+ 2
- 5
mysql/tasks/packages_jessie.yml View File

@@ -18,21 +18,18 @@

- name: Install MySQL packages
apt:
name: '{{ item }}'
name: "{{ mysql_packages }}"
update_cache: yes
state: present
with_items: "{{ mysql_packages }}"
tags:
- mysql
- packages

- name: Install MySQL dev packages
apt:
name: '{{ item }}'
name: libmysqlclient-dev
update_cache: yes
state: present
with_items:
- libmysqlclient-dev
tags:
- mysql
- packages


+ 4
- 7
mysql/tasks/packages_stretch.yml View File

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

- name: Install MySQL packages
apt:
name: '{{ item }}'
name:
- mariadb-server
- mariadb-client
update_cache: yes
state: present
with_items:
- mariadb-server
- mariadb-client
tags:
- mysql
- packages

- name: Install MySQL dev packages
apt:
name: '{{ item }}'
name: default-libmysqlclient-dev
update_cache: yes
state: present
with_items:
- default-libmysqlclient-dev
tags:
- mysql
- packages


+ 8
- 10
mysql/tasks/utils.yml View File

@@ -26,20 +26,18 @@

- name: "Install dependencies for mytop (stretch)"
apt:
name: "{{ item }}"
with_items:
- mariadb-client-10.1
- libconfig-inifiles-perl
- libterm-readkey-perl
name:
- mariadb-client-10.1
- libconfig-inifiles-perl
- libterm-readkey-perl
when: ansible_distribution_release == "stretch"

- name: "Install dependencies for mytop (Debian 10 or later)"
apt:
name: "{{ item }}"
with_items:
- mariadb-client-10.3
- libconfig-inifiles-perl
- libterm-readkey-perl
name:
- mariadb-client-10.3
- libconfig-inifiles-perl
- libterm-readkey-perl
when: ansible_distribution_major_version is version_compare('10', '>=')

- name: Read debian-sys-maint password


+ 7
- 8
nagios-nrpe/tasks/main.yml View File

@@ -1,15 +1,14 @@
---
- name: packages are installed
apt:
name: "{{ item }}"
name:
- nagios-nrpe-server
- monitoring-plugins
- monitoring-plugins-basic
- monitoring-plugins-common
- monitoring-plugins-standard
- nagios-plugins-contrib
state: present
with_items:
- nagios-nrpe-server
- monitoring-plugins
- monitoring-plugins-basic
- monitoring-plugins-common
- monitoring-plugins-standard
- nagios-plugins-contrib
tags:
- nagios-nrpe



+ 3
- 4
nginx/tasks/main_minimal.yml View File

@@ -1,11 +1,10 @@
---
- name: Ensure Nginx is installed
apt:
name: "{{ item }}"
name:
- nginx-light
- ssl-cert
state: present
with_items:
- nginx-light
- ssl-cert
notify: reload nginx
tags:
- nginx


+ 4
- 5
nginx/tasks/munin_vhost.yml View File

@@ -8,12 +8,11 @@

- name: Ensure packages for Munin CGI are installed
apt:
name: '{{ item }}'
name:
- liblwp-useragent-determined-perl
- libcgi-fast-perl
- spawn-fcgi
state: present
with_items:
- liblwp-useragent-determined-perl
- libcgi-fast-perl
- spawn-fcgi

- name: Adjust owner for munin-cgi
shell: "chown --verbose www-data:munin /var/log/munin/munin-cgi-*"


+ 6
- 7
opendkim/tasks/main.yml View File

@@ -1,13 +1,12 @@
---
- name: install OpenDKIM
apt:
name: "{{ item }}"
name:
- opendkim
- opendkim-tools
- ssl-cert
- dns-root-data
state: present
with_items:
- opendkim
- opendkim-tools
- ssl-cert
- dns-root-data
tags:
- opendkim

@@ -59,7 +58,7 @@

- name: Set folder permissions to 0750
file:
path: "/etc/opendkim/"
path: "/etc/opendkim/"
mode: "0750"
force: yes
tags:


+ 4
- 5
packweb-apache/tasks/apache.yml View File

@@ -18,12 +18,11 @@

- name: Additional packages are installed
apt:
name: '{{ item }}'
name:
- libapache2-mod-security2
- modsecurity-crs
- apg
state: present
with_items:
- libapache2-mod-security2
- modsecurity-crs
- apg

- name: Additional modules are enabled
apache2_module:


+ 9
- 10
php/tasks/main_buster.yml View File

@@ -37,26 +37,23 @@

- name: "Install PHP packages (Debian 9 or later)"
apt:
name: '{{ item }}'
name: '{{ php_stretch_packages }}'
state: present
with_items: "{{ php_stretch_packages }}"

- name: "Install mod_php packages (Debian 9 or later)"
apt:
name: '{{ item }}'
name:
- libapache2-mod-php
- php
state: present
with_items:
- libapache2-mod-php
- php
when: php_apache_enable

- name: "Install PHP FPM packages (Debian 9 or later)"
apt:
name: '{{ item }}'
name:
- php-fpm
- php
state: present
with_items:
- php-fpm
- php
when: php_fpm_enable

# Configuration
@@ -77,6 +74,7 @@

- include: config_fpm.yml
when: php_fpm_enable
- name: Enforce permissions on PHP fpm directory
file:
dest: /etc/php/7.3/fpm
@@ -85,6 +83,7 @@

- include: config_apache.yml
when: php_apache_enable
- name: Enforce permissions on PHP apache2 directory
file:
dest: /etc/php/7.3/apache2


+ 22
- 22
php/tasks/main_jessie.yml View File

@@ -16,38 +16,35 @@

- name: "Install PHP packages (jessie)"
apt:
name: '{{ item }}'
name:
- php5-cli
- php5-gd
- php5-imap
- php5-ldap
- php5-mcrypt
- "{{ php_modules_mysqlnd | bool | ternary('php5-mysqlnd','php5-mysql') }}"
- php5-pgsql
- php-gettext
- php5-intl
- php5-curl
- php5-ssh2
- libphp-phpmailer
state: present
with_items:
- php5-cli
- php5-gd
- php5-imap
- php5-ldap
- php5-mcrypt
- "{{ php_modules_mysqlnd | bool | ternary('php5-mysqlnd','php5-mysql') }}"
- php5-pgsql
- php-gettext
- php5-intl
- php5-curl
- php5-ssh2
- libphp-phpmailer

- name: "Install mod_php packages (jessie)"
apt:
name: '{{ item }}'
name:
- libapache2-mod-php5
- php5
state: present
with_items:
- libapache2-mod-php5
- php5
when: php_apache_enable

- name: "Install PHP FPM packages (jessie)"
apt:
name: '{{ item }}'
name:
- php5-fpm
- php5
state: present
with_items:
- php5-fpm
- php5
when: php_fpm_enable

# Configuration
@@ -58,6 +55,7 @@
mode: "0755"

- include: config_cli.yml

- name: Enforce permissions on PHP cli directory
file:
dest: /etc/php5/cli
@@ -65,6 +63,7 @@

- include: config_fpm.yml
when: php_fpm_enable

- name: Enforce permissions on PHP fpm directory
file:
dest: /etc/php5/fpm
@@ -73,6 +72,7 @@

- include: config_apache.yml
when: php_apache_enable

- name: Enforce permissions on PHP apache2 directory
file:
dest: /etc/php5/apache2


+ 10
- 10
php/tasks/main_stretch.yml View File

@@ -37,26 +37,23 @@

- name: "Install PHP packages (Debian 9 or later)"
apt:
name: '{{ item }}'
name: '{{ php_stretch_packages }}'
state: present
with_items: "{{ php_stretch_packages }}"

- name: "Install mod_php packages (Debian 9 or later)"
apt:
name: '{{ item }}'
name:
- libapache2-mod-php
- php
state: present
with_items:
- libapache2-mod-php
- php
when: php_apache_enable

- name: "Install PHP FPM packages (Debian 9 or later)"
apt:
name: '{{ item }}'
name:
- php-fpm
- php
state: present
with_items:
- php-fpm
- php
when: php_fpm_enable

# Configuration
@@ -70,6 +67,7 @@
- /etc/php/7.0

- include: config_cli.yml

- name: Enforce permissions on PHP cli directory
file:
dest: /etc/php/7.0/cli
@@ -77,6 +75,7 @@

- include: config_fpm.yml
when: php_fpm_enable
- name: Enforce permissions on PHP fpm directory
file:
dest: /etc/php/7.0/fpm
@@ -85,6 +84,7 @@

- include: config_apache.yml
when: php_apache_enable
- name: Enforce permissions on PHP apache2 directory
file:
dest: /etc/php/7.0/apache2


+ 2
- 6
postfix/tasks/minimal.yml View File

@@ -1,10 +1,8 @@
---
- name: ensure packages are installed
apt:
name: '{{ item }}'
name: postfix
state: present
with_items:
- postfix
tags:
- postfix

@@ -17,8 +15,6 @@
mode: "0644"
force: yes
notify: restart postfix
when: postfix_force_main_cf == True or
postfix_maincf_md5_jessie in default_main_cf.stdout or
postfix_maincf_md5_stretch in default_main_cf.stdout
when: postfix_force_main_cf or postfix_maincf_md5_jessie in default_main_cf.stdout or postfix_maincf_md5_stretch in default_main_cf.stdout
tags:
- postfix

+ 6
- 9
postfix/tasks/packmail.yml View File

@@ -1,13 +1,12 @@
---
- name: ensure packages are installed
apt:
name: '{{ item }}'
name:
- postfix
- postfix-ldap
- postfix-policyd-spf-python
- mailgraph
state: present
with_items:
- postfix
- postfix-ldap
- postfix-policyd-spf-python
- mailgraph
tags:
- postfix

@@ -20,9 +19,7 @@
mode: "0644"
force: yes
notify: restart postfix
when: postfix_force_main_cf == True or
postfix_maincf_md5_jessie in default_main_cf.stdout or
postfix_maincf_md5_stretch in default_main_cf.stdout
when: postfix_force_main_cf or postfix_maincf_md5_jessie in default_main_cf.stdout or postfix_maincf_md5_stretch in default_main_cf.stdout
tags:
- postfix



+ 1
- 3
rabbitmq/tasks/main.yml View File

@@ -1,9 +1,7 @@
- name: Install packages
apt:
name: "{{ item }}"
name: rabbitmq-server
state: present
with_items:
- rabbitmq-server

- name: Create rabbitmq-env.conf
copy:


+ 11
- 12
rbenv/tasks/main.yml View File

@@ -2,19 +2,18 @@

- name: "Rbenv dependencies are installed"
apt:
name: '{{ item }}'
name:
- build-essential
- git
- libcurl4-openssl-dev
- libffi-dev
- libreadline-dev
- libssl-dev
- libxml2-dev
- libxslt1-dev
- zlib1g-dev
- pkg-config
state: present
with_items:
- build-essential
- git
- libcurl4-openssl-dev
- libffi-dev
- libreadline-dev
- libssl-dev
- libxml2-dev
- libxslt1-dev
- zlib1g-dev
- pkg-config
tags:
- rbenv
- packages


+ 4
- 6
redis/tasks/main.yml View File

@@ -5,11 +5,10 @@

- name: Redis is installed.
apt:
name: "{{ item }}"
name:
- redis-server
- redis-tools
state: present
with_items:
- redis-server
- redis-tools
tags:
- redis
- packages
@@ -86,8 +85,7 @@
- nrpe

- include: nrpe.yml
when:
- nrpe_evolix_config.stat.exists == true
when: nrpe_evolix_config.stat.exists
tags:
- redis
- nrpe


+ 14
- 15
redmine/tasks/packages.yml View File

@@ -1,21 +1,20 @@
---
- name: Install dependancy
apt:
name: "{{ item }}"
name:
- libpam-systemd
- imagemagick
- git-core
- git-svn
- gcc
- build-essential
- libxml2-dev
- libxslt1-dev
- libssl-dev
- libmagickwand-dev
- libmagickcore-dev
- libmariadbclient-dev
- python-mysqldb
state: present
with_items:
- libpam-systemd
- imagemagick
- git-core
- git-svn
- gcc
- build-essential
- libxml2-dev
- libxslt1-dev
- libssl-dev
- libmagickwand-dev
- libmagickcore-dev
- libmariadbclient-dev
- python-mysqldb
tags:
- redmine

+ 3
- 4
spamassasin/tasks/main.yml View File

@@ -1,11 +1,10 @@
---
- name: install SpamAssasin
apt:
name: "{{ item }}"
name:
- spamassassin
- evomaintenance
state: present
with_items:
- spamassassin
- evomaintenance
tags:
- spamassassin



+ 3
- 4
squid/tasks/main.yml View File

@@ -17,11 +17,10 @@

- name: "Install Squid packages"
apt:
name: '{{ item }}'
name:
- "{{ squid_daemon_name }}"
- squidclient
state: present
with_items:
- "{{ squid_daemon_name }}"
- squidclient

- name: "Set alternative config file (Debian 9 or later)"
copy:


+ 4
- 5
tomcat/tasks/packages.yml View File

@@ -1,12 +1,11 @@
---
- name: Install packages
apt:
name: "{{ item }}"
name:
- "tomcat{{ tomcat_version }}"
- "tomcat{{ tomcat_version }}-user"
- "libpam-systemd"
state: present
with_items:
- "tomcat{{ tomcat_version }}"
- "tomcat{{ tomcat_version }}-user"
- "libpam-systemd"

- name: Create tomcat root dir
file:


+ 5
- 10
webapps/evoadmin-web/tasks/packages.yml View File

@@ -6,10 +6,8 @@

- name: Install PHP packages (Debian 10 and later)
apt:
name: '{{ item }}'
name: php-pear
state: present
with_items:
- php-pear
when: ansible_distribution_major_version is version_compare('10', '>=')

# /!\ Warning, this is a temporary hack
@@ -27,18 +25,15 @@

- name: Install PHP packages (stretch)
apt:
name: '{{ item }}'
name:
- php-pear
- php-log
state: present
with_items:
- php-pear
- php-log
when: ansible_distribution_release == "stretch"

- name: Install PHP5 packages (jessie)
apt:
name: '{{ item }}'
name: php5-pam
state: present
allow_unauthenticated: True
with_items:
- php5-pam
when: ansible_distribution_release == "jessie"

+ 7
- 8
webapps/roundcube/tasks/main.yml View File

@@ -13,15 +13,14 @@

- name: install Roundcube
apt:
name: "{{ item }}"
name:
- imapproxy
- roundcube
- roundcube-sqlite3
- roundcube-plugins
- php-net-sieve
- php-zip
state: present
with_items:
- imapproxy
- roundcube
- roundcube-sqlite3
- roundcube-plugins
- php-net-sieve
- php-zip
tags:
- roundcube



Loading…
Cancel
Save