We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
#!/bin/bash | |
# Add Vagrant's hostupdater commands to sudoers, for `vagrant up` without a password | |
# force sudo on self. | |
if [ $( id -u ) -ne 0 ]; then | |
exec sudo -p "Login password for %p: " "$0" "$@" | |
exit $? | |
fi | |
# Stage updated sudoers in a temporary file for syntax checking |
#!/usr/bin/python | |
DOCUMENTATION = ''' | |
--- | |
module: copy_remotely | |
short_description: Copies a file from the remote server to the remote server. | |
description: | |
- Copies a file but, unlike the M(file) module, the copy is performed on the | |
remote server. | |
The copy is only performed if the source and destination files are different | |
(different MD5 sums) or if the destination file does not exist. |
The problem: | |
I wanted to use the jinja 'map' filter to modify each item in a string, in this simple | |
example, adding '.conf' to each item. | |
The 'format' filter in jinja takes arguments (value, *args, **kwargs). Unfortunately, | |
it uses 'value' as the pattern. When called inside map 'value' is the current item in | |
the list, or in other words *args as far as format is concerned. So it's the wrong way | |
around. |
#!/bin/bash -e | |
# Run a program requiring xserver as another user by passing on the xauth cookie | |
# s. http://askubuntu.com/questions/871092/failed-to-connect-to-mir-failed-to-connect-to-server-socket-no-such-file-or-di?newreg=811c7a1d637341c5b294d8b515e8b6e7 | |
# s. http://serverfault.com/questions/51005/how-to-use-xauth-to-run-graphical-application-via-other-user-on-linux | |
# AUTHOR: Florian Lentsch <office@florian-lentsch.at> | |
# TESTED: on Ubuntu 16.04 only | |
# | |
# USAGE: xsudo <username> <command> |
This document shows how to deploy an OpenShift instance on a server using CodeReady Containers (crc) that can be accessed remotely from one or more client machines (sometimes called a "headless" instance). This provides a low-cost test and development platform that can be shared by developers. Deploying this way also allows a user to create an instance that uses more cpu and memory resources than may be available on his or her laptop.
While there are benefits to this type of deployment, please note that the primary use case for crc is to deploy a local OpenShift instance on a workstation or laptop and access it directly from the same machine. The headless setup is configured completely outside of crc itself, and supporting a headless setup is beyond the mission of the crc development team. Please do not ask for changes to crc to support this type of deployment, it will only cost the team time as they politely decline :)
The instructions here were tested with F