forked from ISTI-ansible-roles/ansible-roles
library/roles: More ansible 2 cleanup.
This commit is contained in:
parent
7413e6398a
commit
289fa488c3
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
- name: Install fail2ban on ubuntu >= 14.04 and debian >= 8
|
||||
apt: pkg={{ item }} state=installed
|
||||
with_items: f2b_packages
|
||||
with_items: '{{ f2b_packages }}'
|
||||
tags: fail2ban
|
||||
|
||||
- name: Ensure that fail2ban is enabled and running
|
||||
|
|
|
@ -56,7 +56,6 @@ postgres_gis_pkgs:
|
|||
|
||||
|
||||
pg_backup_enabled: True
|
||||
pg_backup_logdir: /var/log/postgresql
|
||||
pg_backup_bin: /usr/local/sbin/postgresql-backup
|
||||
pg_backup_pgdump_bin: /usr/bin/pg_dump
|
||||
pg_backup_retain_copies: 15
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: Disable some unneeded services
|
||||
service: name={{ item }} state=stopped enabled=no
|
||||
with_items: services_to_be_disabled
|
||||
with_items: '{{ services_to_be_disabled }}'
|
||||
ignore_errors: True
|
||||
tags: [ 'bootstrap', 'disable_services' ]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
- name: Install the additional CA certificates
|
||||
get_url: url={{ item.url }} dest={{ item.dest_file }}
|
||||
with_items: x509_additional_ca_certs
|
||||
with_items: '{{ x509_additional_ca_certs }}'
|
||||
when: install_additional_ca_certs
|
||||
notify: Update the CA bundle list
|
||||
tags: ca
|
||||
|
|
|
@ -55,13 +55,12 @@
|
|||
|
||||
- name: install common packages
|
||||
apt: pkg={{ item }} state={{ pkg_state }}
|
||||
when: has_apt
|
||||
with_items: common_packages
|
||||
with_items: '{{ common_packages }}'
|
||||
tags: [ 'packages', 'common_pkgs' ]
|
||||
|
||||
- name: Install additional packages, if any
|
||||
apt: pkg={{ item }} state={{ pkg_state }}
|
||||
with_items: additional_packages
|
||||
with_items: '{{ additional_packages }}'
|
||||
when: additional_packages is defined
|
||||
tags: [ 'packages', 'common_pkgs', 'additional_packages' ]
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
# TODO: fetch the keys from ldap
|
||||
- name: various pub ssh keys for users and apps
|
||||
authorized_key: user=root key="{{ item }}" state=present
|
||||
with_items: root_ssh_keys
|
||||
with_items: '{{ root_ssh_keys }}'
|
||||
when: manage_root_ssh_keys
|
||||
tags: root_pubkeys
|
||||
|
||||
- name: Remove obsolete keys from the authorized ones
|
||||
authorized_key: user=root key="{{ item }}" state=absent
|
||||
with_items: obsolete_root_ssh_keys
|
||||
with_items: '{{ obsolete_root_ssh_keys }}'
|
||||
when: obsolete_root_ssh_keys is defined
|
||||
tags: root_pubkeys
|
||||
|
|
|
@ -1,40 +1,34 @@
|
|||
---
|
||||
- name: Remove unneeded base packages
|
||||
apt: pkg={{ item }} state=removed
|
||||
with_items: cleanup_base_packages
|
||||
with_items: '{{ cleanup_base_packages }}'
|
||||
when: cleanup_base_packages
|
||||
tags:
|
||||
- packages
|
||||
- pkg_cleanup
|
||||
tags: [ 'packages', 'pkg_cleanup' ]
|
||||
|
||||
- name: Remove unneeded X packages
|
||||
apt: pkg={{ item }} state=removed
|
||||
with_items: x_base_packages_to_remove
|
||||
with_items: '{{ x_base_packages_to_remove }}'
|
||||
when: cleanup_x_base_packages
|
||||
tags:
|
||||
- packages
|
||||
- pkg_cleanup
|
||||
tags: [ 'packages', 'pkg_cleanup' ]
|
||||
|
||||
- name: Remove the nfs packages
|
||||
apt: pkg={{ item }} state=removed
|
||||
with_items: nfs_packages
|
||||
with_items: '{{ nfs_packages }}'
|
||||
when:
|
||||
- is_not_precise
|
||||
- cleanup_nfs_packages
|
||||
tags:
|
||||
- packages
|
||||
- pkg_cleanup
|
||||
tags: [ 'packages', 'pkg_cleanup' ]
|
||||
|
||||
- name: Remove rpcbind packages
|
||||
apt: pkg={{ item }} state=removed
|
||||
with_items: rpcbind_packages
|
||||
with_items: '{{ rpcbind_packages }}'
|
||||
when:
|
||||
- cleanup_rpcbind_packages
|
||||
tags: [ 'packages', 'pkg_cleanup' ]
|
||||
|
||||
- name: Remove the exim packages
|
||||
apt: name={{ item }} state=removed
|
||||
with_items: exim_email_server_pkgs
|
||||
with_items: '{{ exim_email_server_pkgs }}'
|
||||
when: cleanup_exim_email_server
|
||||
tags: [ 'packages', 'pkg_cleanup', 'exim' ]
|
||||
|
||||
|
|
Loading…
Reference in New Issue