pip install cryptography
The EDITOR
const is optional, but I use to show how to force the use of
an editor instead of another.
############################################################################################################## | |
# https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html#upgrading-powershell-and-net-framework | |
# | |
# The username and password parameters are stored in plain text in the registry. Make sure the Remove-Item | |
# commands are run, check them after the script finishes to ensure no credentials are still stored on the host. | |
# | |
# The ConfigureRemotingForAnsible.ps1 script is intended for training and development purposes only and | |
# should not be used in a production environment, since it enables settings (like Basic authentication) | |
# that can be inherently insecure. | |
############################################################################################################## |
#!/bin/bash | |
# Download and run | |
# curl https://gist.githubusercontent.com/realtebo/3451070eba5a55186afb686d1690abd2/raw/install_ansible.sh?_=$(date +%s) | bash | |
sudo apt-get update && sudo apt-get install software-properties-common -y | |
sudo apt-add-repository universe -y | |
sudo apt-add-repository ppa:ansible/ansible -y | |
sudo apt-get update && sudo apt-get install ansible python-pip -y | |
pip install "pywinrm>=0.3.0" |
[local] | |
localhost ansible_connection=local | |
[windows:vars] | |
ansible_winrm_scheme=http | |
ansible_connection=winrm |
For the file group_vars/windows/main.yml
I suggest to use ansible vault
FROM php:7.0.4-fpm | |
RUN apt-get update && apt-get install -y libmcrypt-dev \ | |
mysql-client libmagickwand-dev --no-install-recommends \ | |
&& pecl install imagick \ | |
&& docker-php-ext-enable imagick \ | |
&& docker-php-ext-install mcrypt pdo_mysql |
Clone Ubuntu base VM
Assign IP to the new machine (read MAC at assign using DHCP)
Add the ip to ansible [dns]
group, in the file /etc/ansible/hosts
Login with default username and password
Enble SSH auth via password to allow first ansible login
sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes' /etc/ssh/sshf_config
Restart
From ansible controller, check
if (workbox) { | |
console.log(`Yay! Workbox is loaded 🎉`); | |
// workbox.setConfig({ debug: false }); | |
// workbox.precaching.suppressWarnings(); | |
workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); | |
workbox.routing.registerRoute(/^https?.*/, workbox.strategies.networkFirst(), 'GET'); | |
} else { | |
console.log(`Boo! Workbox didn't load 😬`); | |
} |
server.get("/service-worker.js", (req, res) => { | |
// Don't cache service worker is a best practice (otherwise clients wont get emergency bug fix) | |
res.set("Cache-Control", "no-store, no-cache, must-revalidate, proxy-revalidate"); | |
res.set("Content-Type", "application/javascript"); | |
const filePath = join(__dirname, '.next', req.url); | |
app.serveStatic(req, res, filePath); | |
}); | |
# Source of truth | |
# https://support.nagios.com/kb/article/nagios-core-installing-nagios-core-from-source-96.html#Debian | |
# About nginx installation | |
# https://olivertappin.com/command-line-tools/installing-nagios-nginx-php-fpm-nagiosgraph-ubuntu-16-04/ | |
# All steps on debian require root AND `-` to use full env | |
su - | |
# Prerequisites |