Fix some broken variables.

This commit is contained in:
Andrea Dell'Amico 2020-11-17 17:34:49 +01:00
parent 9741cf8c86
commit 0a4c335e64
7 changed files with 21 additions and 29 deletions

View File

@ -2,6 +2,10 @@
dependencies:
- role: '../../library/centos/roles/external-repos'
- role: '../../library/centos/roles/basic-setup'
- src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-basic-system-setup.git
version: master
name: basic-system-setup
state: latest
- role: '../../library/roles/motd'
- role: '../../library/roles/linux-kernel-sysctl'
- role: '../../library/centos/roles/tuned-setup'

View File

@ -6,6 +6,8 @@
- name: Install python-software-properties
apt: pkg=python-software-properties state=present update_cache=yes cache_valid_time=3600
when: is_trusty
when:
- ansible_distribution == 'Ubuntu'
- ansible_distribution_version is version_compare('14.04', '==')
tags: pythonapt

View File

@ -10,5 +10,5 @@
when:
- disable_apport_service
- ansible_distribution == "Ubuntu"
- ansible_distribution_version is version_compare('18.04', '<')
- ansible_distribution_version is version_compare('18.04', '>=')
tags: [ 'bootstrap', 'disable_services', 'apport' ]

View File

@ -9,9 +9,9 @@
when: install_nscd
- import_tasks: remove-unneeded-pkgs.yml
- import_tasks: denyhost.yml
when: is_debian_7_or_older
- import_tasks: denyhost.yml
when: is_ubuntu_less_than_trusty
when:
- ansible_distribution == "Debian"
- ansible_distribution_release == "wheezy"
- import_tasks: munin.yml
when: configure_munin
- import_tasks: pubkeys.yml
@ -27,4 +27,3 @@
- import_tasks: manage_su_limits.yml
- import_tasks: disable-unneeded-services.yml

View File

@ -25,17 +25,23 @@
- name: Default the backports repository on debian 7
copy: src=backports-wheezy dest=/etc/apt/preferences.d/backports owner=root group=root mode=644
when: is_debian7 | bool
when:
- ansible_distribution == "Debian"
- ansible_distribution_release == "wheezy"
tags: wheezy-backports
- name: Install the backports repository on debian 7
apt_repository: repo='deb http://http.debian.net/debian wheezy-backports main' state=present update_cache=yes
when: is_debian7 | bool
when:
- ansible_distribution == "Debian"
- ansible_distribution_release == "wheezy"
tags: wheezy-backports
- name: Install the backports repository on debian 8
apt_repository: repo='deb http://http.debian.net/debian jessie-backports main' state=present update_cache=yes
when: is_debian8 | bool
when:
- ansible_distribution == "Debian"
- ansible_distribution_release == "jessie"
tags: jessie-backports
- name: install common packages

View File

@ -11,9 +11,7 @@
- name: Remove the nfs packages
apt: pkg={{ nfs_packages }} state=absent
when:
- is_not_precise
- cleanup_nfs_packages
when: cleanup_nfs_packages
tags: [ 'packages', 'pkg_cleanup' ]
- name: Remove rpcbind packages
@ -26,7 +24,6 @@
when: cleanup_exim_email_server
tags: [ 'packages', 'pkg_cleanup', 'exim' ]
- name: Remove LXD
apt: name={{ ubuntu_lxd_pkgs }} state=absent
when: ubuntu_remove_lxd

View File

@ -1,20 +1,4 @@
---
- name: Fix rsyslog behaviour on some ubuntu machines disabling the kernel logger
lineinfile: dest=/etc/rsyslog.conf regexp="\\$ModLoad\ imklog" line="#$ModLoad imklog" backup=yes
when:
- is_precise and ansible_kernel != "3.2.0-4-amd64"
- is_not_trusty
notify: Restart rsyslog
tags: rsyslog
- name: Enable the kernel logger on ubuntu >= 12.04 and kernel major version >= 3
lineinfile: dest=/etc/rsyslog.conf line="$ModLoad imklog " insertafter="\\$ModLoad\ imuxsock" backup=yes
when:
- is_precise and ansible_kernel == "3.2.0-4-amd64"
- is_trusty
notify: Restart rsyslog
tags: rsyslog
- name: Install custom rsyslog rules
template: src=10-custom_rules.conf.j2 dest=/etc/rsyslog.d/10-custom_rules.conf owner=root group=root mode=0444
when: default_rsyslog_custom_rules is defined