Refactor: change 'state=installed' with 'state=present' everywhere.

This commit is contained in:
Andrea Dell'Amico 2018-08-09 18:52:55 +02:00
parent 07ebea657c
commit 7a67ba48d2
21 changed files with 30 additions and 30 deletions

View File

@ -1,6 +1,6 @@
---
- name: Install additional packages, if needed
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items: '{{ dnet_additional_packages | default ([]) }}'
tags: ['dnet', 'pkgs']

View File

@ -18,7 +18,7 @@
tags: drupal
- name: Install the drupal deb package
apt: name=drupal state=installed
apt: name=drupal state=present
when: drupal_install_deb
tags: [ 'drupal', 'drupal_deb' ]

View File

@ -1,6 +1,6 @@
---
- name: Install fail2ban on ubuntu >= 14.04 and debian >= 8
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items: '{{ f2b_packages }}'
tags: fail2ban

View File

@ -1,12 +1,12 @@
---
- block:
- name: Install the ganglia client
apt: pkg={{ item }} state=installed update_cache=yes cache_valid_time=3600
apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=3600
with_items:
- ganglia-monitor
- name: Install the ganglia linux specific plugins. We need at least ubuntu trusty. Or debian 7. Or debian 8
apt: pkg={{ item }} state=installed force=yes
apt: pkg={{ item }} state=present force=yes
with_items:
- ganglia-modules-linux
- ganglia-monitor-python
@ -14,7 +14,7 @@
when: is_trusty
- name: Install the ganglia linux specific plugins. We need at least ubuntu trusty. Or debian 7. Or debian 8
apt: pkg={{ item }} state=installed force=yes
apt: pkg={{ item }} state=present force=yes
with_items:
- ganglia-modules-linux
- ganglia-monitor-python
@ -22,7 +22,7 @@
when: is_debian7
- name: Install the ganglia linux specific plugins. We need at least ubuntu trusty. Or debian 7. Or debian 8
apt: pkg={{ item }} state=installed force=yes
apt: pkg={{ item }} state=present force=yes
with_items:
- ganglia-modules-linux
- ganglia-monitor-python

View File

@ -1,6 +1,6 @@
---
- name: Install the apache packages
apt: pkg={{ item }} state=installed force=yes
apt: pkg={{ item }} state=present force=yes
with_items:
- apache2
- apache2-mpm-prefork

View File

@ -1,6 +1,6 @@
---
- name: Install the jetty packages
apt: pkg={{ item }} state=installed force=yes
apt: pkg={{ item }} state=present force=yes
with_items:
- jetty
- libapache2-mod-jk

View File

@ -1,6 +1,6 @@
---
- name: Install the jetty packages
apt: pkg={{ item }} state=installed force=yes
apt: pkg={{ item }} state=present force=yes
with_items:
- jetty
tags:
@ -13,7 +13,7 @@
- jetty
- name: Install the apache mod_jk module, if needed
apt: pkg={{ item }} state=installed force=yes
apt: pkg={{ item }} state=present force=yes
with_items:
- libapache2-mod-jk
when: jetty_use_apache is defined and jetty_use_apache

View File

@ -38,7 +38,7 @@
tags: mongodb
- name: Install the mongodb server
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items:
- mongodb-server
when:

View File

@ -1,6 +1,6 @@
---
- name: Install the plugin dependencies
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items: check_tomcat_deps
tags:
- nagios

View File

@ -33,12 +33,12 @@
tags: [ 'dell', 'nagios' ]
- name: Install the Dell OMSA packages dependencies
apt: pkg={{ item }} state=installed force=yes update_cache=yes cache_valid_time=1800
apt: pkg={{ item }} state=present force=yes update_cache=yes cache_valid_time=1800
with_items: '{{ nagios_dell_omsa_deps }}'
tags: [ 'dell', 'nagios' ]
- name: Install other Dell OMSA packages dependencies
apt: pkg={{ item }} state=installed update_cache=yes cache_valid_time=1800
apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=1800
with_items:
- python-requests
register: requests_pkg
@ -46,7 +46,7 @@
tags: [ 'dell', 'nagios' ]
- name: Install the python-pip package if requests is not available as a package
apt: pkg={{ item }} state=installed update_cache=yes cache_valid_time=1800
apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=1800
with_items:
- python-pip
when: requests_pkg|failed

View File

@ -9,7 +9,7 @@
- nagios
- name: Install some packages needed by the hardware checks
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items:
- smartmontools
tags:

View File

@ -1,11 +1,11 @@
---
- name: Install the nagios packages
apt: pkg={{ item }} state=installed update_cache=yes cache_valid_time=1800
apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=1800
with_items: '{{ nagios_plugins_base_pkgs }}'
tags: nagios
- name: Additional nagios plugins when available
apt: pkg={{ item }} state=installed update_cache=yes cache_valid_time=1800
apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=1800
with_items: '{{ nagios_plugins_contrib }}'
tags: [ 'nagios', 'nagios_plug_contrib' ]

View File

@ -4,14 +4,14 @@
tags:
- nsca
- apt: pkg={{ item }} state=installed
- apt: pkg={{ item }} state=present
with_items:
- nsca-client
when: '(({{ is_not_ubuntu_less_than_precise }}) == True) or (({{ is_debian7 }}) == True)'
tags:
- nsca
- apt: pkg={{ item }} state=installed
- apt: pkg={{ item }} state=present
with_items:
- nsca
when: "(({{ is_not_debian_less_than_6 }}) == True) and (({{ is_ubuntu_less_than_precise }}) == True)"

View File

@ -12,7 +12,7 @@
- nagios
- name: Install the packages needed to check postgres via nagios
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items:
- check-postgres
tags:

View File

@ -9,7 +9,7 @@
tags: postfix-relay
- name: Install the sasl2 authentication infrastructure
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items: '{{ postfix_sasl_packages }}'
tags: postfix-relay

View File

@ -1,6 +1,6 @@
---
- name: install the packages needed to run the redmine infrastructure. install the ruby packages needed to run redmine. Set ruby 1.9.3 as default
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items: redmine_base_packages_old_gems
notify:
- set ruby 1.9.3 as default

View File

@ -1,6 +1,6 @@
---
- name: Install the packages needed to run the redmine infrastructure. install the ruby packages needed to run redmine. Use ruby 2.0
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items: redmine_base_packages
tags:
- ruby

View File

@ -91,7 +91,7 @@
tags: redmine
- name: Install the packages needed by plugins or to build plugins required gems
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items:
- libxslt1-dev
tags: redmine

View File

@ -1,13 +1,13 @@
---
- name: Install the postgresql command line client
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items:
- postgresql-client
when: tomcat_install_jdbc is defined and tomcat_install_jdbc
tags: [ 'postgres', 'postgresql', 'tomcat' ]
- name: Install the mongodb client
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items:
- mongodb-clients
when:

View File

@ -1,7 +1,7 @@
---
# Postgresql JDBC
- name: Install the jdbc package if needed
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state=present
with_items:
- libpostgresql-jdbc-java
when: tomcat_install_pg_jdbc

View File

@ -1,6 +1,6 @@
---
- name: Install the vsftpd package
apt: pkg=vsftpd state=installed update_cache=yes cache_valid_time=3600
apt: pkg=vsftpd state=present update_cache=yes cache_valid_time=3600
tags: [ 'vsftpd', 'ftp' ]
- name: Install the vsftpd configuration file