Having been using Ansible for a bit now I’ve found these loops quite useful. Installing multiple packages: – name: Install packages apt: state: present install_recommends: no name: – asterisk – asterisk-mysql Copying files: – name: Copy files synchronize: src={{item.src}} dest={{item.dest}} with_items: – { src: ‘/srv/deploy/fail2ban/asterisk.conf’, dest: ‘/etc/fail2ban/filter.d’ } – { […]
ln -s /lib/systemd/system/poweroff.target /etc/systemd/system/ctrl-alt-del.target then reset systemd daemon: systemctl daemon-reload
Postfixadmin setup https://www.exratione.com/2016/05/a-mailserver-on-ubuntu-16-04-postfix-dovecot-mysql/ Autoconfiguration of email clients: The Perl Script: https://github.com/virtualmin/virtualmin-gpl/blob/master/autoconfig.cgi The Apache config: https://serverfault.com/questions/829260/block-requests-from-bots-by-pattern-in-apache-with-mod-rewrite-mod-rewrite-not The STARTTLS problem https://www.virtualmin.com/node/52609 The key is to remove the SSL line and add <Encryption>tls</Encryption> Example for Outlook: <?xml version=”1.0″ encoding=”utf-8″ ?> <Autodiscover xmlns=”http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006″> <Response xmlns=”http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a”> <Account> <AccountType>email</AccountType> <Action>settings</Action> <Protocol> <Type>IMAP</Type> <TTL>24</TTL> <Server>$IMAP_HOST</Server> <Port>$IMAP_PORT</Port> <LoginName>$SMTP_LOGIN</LoginName> <DomainRequired>off</DomainRequired> […]
virsh and lxc cannot access their interfaces? touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf to create a new empty config file then reboot. Details here: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1638842
isoinfo -d -i /dev/cdrom Make note of “blocksize” and “count” dd if=/dev/cdrom bs=blocksize count=count of=/path/to/image.iso
Check xauth is installed Connection to localhost failing: Add “X11UseLocalHost no” to /etc/ssh/sshd_config (common if ipv6 localhost exists but IPv6 is disabled.)
https://sourceforge.net/projects/outlookcaldavsynchronizer/ is an Outlook plugin that will sync with gmail or any other calDAV server. eg: https://www.cyrusimap.org/ (Email, contacts & calendar server) http://radicale.org/ https://www.davical.org/ https://sogo.nu/ https://www.calendarserver.org/ (Apple Darwin) https://www.horde.org/
Add server to /etc/hosts & /etc/hostname. eg: 172.16.0.1 pdc.WINDOMAIN.domain.org.uk WINDOMAIN.domain.org.uk pdc /etc/network/interfaces to contains: * dns-nameservers 172.16.0.1 208.67.222.222 208.67.220.220 (Open DNS) * dns-search WINDOMAIN.domain.org.uk Users client DNS & WINS servers point to 172.16.0.1 (issued via DHCP) apt-get update; apt-get upgrade -y apt-get install samba smbclient samba-dev libpam-winbind rm /etc/samba/smb.conf samba-tool […]
/sbin/iptables -A PREROUTING -t nat -p tcp -d oldIP –dport oldport -j DNAT –to newIP:newport /sbin/iptables -A FORWARD -p tcp -d newIP –dport newport -j ACCEPT
edit /etc/exim.conf.local Add the following lines: @ROUTERSTART@ smart_route: driver = manualroute domains = !+local_domains transport = remote_smtp route_list = * mailout.serverpronto.com Execute this command: /scripts/buildeximconf