From: https://gist.github.com/botchagalupe/53695f50eebbd3eaa9aa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOX_IMAGE = "bento/centos-6.7" | |
NODE_COUNT = 2 | |
Vagrant.configure("2") do |config| | |
config.vm.define "master" do |subconfig| | |
subconfig.vm.box = BOX_IMAGE | |
end | |
(1..NODE_COUNT).each do |i| | |
config.vm.define "node#{i}" do |subconfig| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: docker | |
tasks: | |
- command: "echo {{ item }}" | |
register: result | |
with_items: | |
- 1dag | |
- 2 | |
- 3 | |
- debug: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS C:\chefkitchen\centos> tree | |
Folder PATH listing for volume OSDisk | |
Volume serial number is 6AB2-6767 | |
C:. | |
├───.kitchen | |
│ ├───kitchen-vagrant | |
│ │ └───kitchen-centos-default-centos-72 | |
│ │ └───.vagrant | |
│ │ └───machines | |
│ │ └───default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@d83b16476045 /]# service sshd status | |
bash: service: command not found | |
[root@d83b16476045 /]# systemctl status sshd | |
Failed to get D-Bus connection: Operation not permitted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
what is the problem here | |
testu@ubuntu:~/playbooks/new$ cat when.yml | |
--- | |
- hosts: fedora | |
gather_facts: no | |
tasks: | |
- name: install apache to appropriate distro to ubuntu | |
command: apt-get -y install apache2 | |
when: ansible_os_family == "Debian" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@localhost ~]# /sbin/iptables -nvL | |
Chain INPUT (policy ACCEPT 0 packets, 0 bytes) | |
pkts bytes target prot opt in out source destination | |
390 35545 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED | |
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 | |
0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0 | |
4 176 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 | |
136 10426 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited | |
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ifconfig | |
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 | |
inet 127.0.0.1 netmask 255.0.0.0 | |
inet6 ::1 prefixlen 128 scopeid 0x10<host> | |
loop txqueuelen 1 (Local Loopback) | |
RX packets 20 bytes 1740 (1.6 KiB) | |
RX errors 0 dropped 0 overruns 0 frame 0 | |
TX packets 20 bytes 1740 (1.6 KiB) | |
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Starting "default"... | |
(default) Check network to re-create if needed... | |
(default) Windows might ask for the permission to create a network adapter. Some | |
times, such confirmation window is minimized in the taskbar. | |
(default) Creating a new host-only adapter produced an error: C:\Program Files\O | |
racle\VirtualBox\VBoxManage.exe hostonlyif create failed: | |
(default) 0%... | |
(default) Progress state: E_FAIL | |
(default) VBoxManage.exe: error: Failed to create the host-only adapter | |
(default) VBoxManage.exe: error: Could not find Host Interface Networking driver |
NewerOlder