Skip to content

Instantly share code, notes, and snippets.

View urpylka's full-sized avatar

Artem Smirnov urpylka

View GitHub Profile
@urpylka
urpylka / useradd.yml
Created December 27, 2021 10:48
Ansible playbook to add user
# This playbook adds users to target linux servers with 'adm' group
# Author: Artem Smirnov <[email protected]>
# Using:
# 1. You need to add user certificates to './files' dir or to ./,
# where it has a next name format '<username>.pub'
# <username> will be used as username on servers.
# 2. ansible-playbook useradd.yml -i hosts -e 'target=<some_targets>'
#!/bin/sh
autorefresh() {
test -d /etc/cups || return 1
echo puk
/usr/bin/inotifywait -m -e close_write,moved_to,create /etc/cups |
while read -r directory events filename; do
if [ "$filename" = "printers.conf" ]; then
rm -rf /services/AirPrint-*.service
/root/airprint-generate.py -d /services