Skip to content

Instantly share code, notes, and snippets.

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|
---
- hosts: docker
tasks:
- command: "echo {{ item }}"
register: result
with_items:
- 1dag
- 2
- 3
- debug:
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
[root@d83b16476045 /]# service sshd status
bash: service: command not found
[root@d83b16476045 /]# systemctl status sshd
Failed to get D-Bus connection: Operation not permitted
# -*- 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
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"
[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)
$ 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
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