diff --git a/.gitignore b/.gitignore index 8000dd9..fa9f20a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .vagrant +tests/roles/ansible-sshd diff --git a/Vagrantfile b/Vagrantfile index 149727e..4c07330 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -4,24 +4,29 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - # config.vm.define "ubuntu" do |ubuntu| - # ubuntu.vm.box = "ubuntu/trusty64" - # ubuntu.vm.provision "shell", inline: <<-SHELL - # sudo add-apt-repository -y ppa:ansible/ansible - # sudo apt-get update -qq - # sudo apt-get -qq install ansible - # SHELL - # end - - config.vm.define "centos6" do |centos| - centos.vm.box = "bento/centos-6.7" + config.vm.define "ubuntu" do |ubuntu| + ubuntu.vm.box = "boxcutter/ubuntu1604" +# ubuntu.vm.provision "shell", inline: <<-SHELL +# sudo add-apt-repository -y ppa:ansible/ansible +# sudo apt-get update -qq +# sudo apt-get -qq install ansible +# SHELL end +# config.vm.define "centos7" do |centos| +# centos.vm.box = "boxcutter/centos72" + +# centos.vm.provision "shell", inline: <<-SHELL +# sudo yum install -y libselinux-python +# SHELL +# end + config.vm.provision "shell", inline: <<-SHELL - sudo yum install -y libselinux-python + test -e /vagrant/tests/roles/ansible-sshd || ln -s /vagrant /vagrant/tests/roles/ansible-sshd SHELL config.vm.provision "ansible_local" do |ansible| +# ansible.config_file = "tests/ansible.cfg" ansible.playbook = "tests/test.yml" ansible.install = true end diff --git a/tests/roles/.gitkeep b/tests/roles/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/roles/ansible-sshd b/tests/roles/ansible-sshd deleted file mode 120000 index a24d5e8..0000000 --- a/tests/roles/ansible-sshd +++ /dev/null @@ -1 +0,0 @@ -../../. \ No newline at end of file diff --git a/tests/test.yml b/tests/test.yml index f143641..3455971 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -1,5 +1,5 @@ --- -- hosts: localhost +- hosts: all become: true roles: - ansible-sshd