forked from FF-RGB/ansible
common: sync with binary kitchen role
This commit is contained in:
parent
c4204b60e1
commit
c80bb7c3d4
10
roles/common/files/50-virtio-kernel-names.link
Normal file
10
roles/common/files/50-virtio-kernel-names.link
Normal file
@ -0,0 +1,10 @@
|
||||
# udev 226 introduced predictable interface names for virtio;
|
||||
# disable this for upgrades. You can remove this file if you update your
|
||||
# network configuration to move to the ens* names instead.
|
||||
# See /usr/share/doc/udev/README.Debian.gz for details about predictable
|
||||
# network interface names.
|
||||
[Match]
|
||||
Driver=virtio_net
|
||||
|
||||
[Link]
|
||||
NamePolicy=onboard kernel
|
6
roles/common/files/99-default.link
Normal file
6
roles/common/files/99-default.link
Normal file
@ -0,0 +1,6 @@
|
||||
# This machine is most likely a virtualized guest, where the old persistent
|
||||
# network interface mechanism (75-persistent-net-generator.rules) did not work.
|
||||
# This file disables /lib/systemd/network/99-default.link to avoid
|
||||
# changing network interface names on upgrade. Please read
|
||||
# /usr/share/doc/udev/README.Debian.gz about how to migrate to the currently
|
||||
# supported mechanism.
|
1
roles/common/files/resume
Normal file
1
roles/common/files/resume
Normal file
@ -0,0 +1 @@
|
||||
RESUME=none
|
4
roles/common/handlers/main.yml
Normal file
4
roles/common/handlers/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
- name: update-initramfs
|
||||
command: update-initramfs -u -k all
|
@ -15,6 +15,10 @@
|
||||
- vim-nox
|
||||
- zsh
|
||||
|
||||
- name: Install qemu-agent on KVM VMs
|
||||
apt: name=qemu-guest-agent
|
||||
when: ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm"
|
||||
|
||||
- name: Configure misc software
|
||||
copy: src={{ item.src }} dest={{ item.dest }}
|
||||
with_items:
|
||||
@ -26,3 +30,13 @@
|
||||
|
||||
- name: Set shell for root user
|
||||
user: name=root shell=/bin/zsh
|
||||
|
||||
- name: Disable hibernation/resume
|
||||
copy: src=resume dest=/etc/initramfs-tools/conf.d/resume
|
||||
notify: update-initramfs
|
||||
|
||||
- name: Prevent normal users from running su
|
||||
lineinfile:
|
||||
path: /etc/pam.d/su
|
||||
regexp: '^.*auth\s+required\s+pam_wheel.so$'
|
||||
line: 'auth required pam_wheel.so'
|
||||
|
Loading…
Reference in New Issue
Block a user