sysco-middleware / ansible-role-oracle-database

Ansible Role: oracle-database
MIT License
16 stars 38 forks source link

Testing on Vagrant #3

Closed bernardoVale closed 8 years ago

bernardoVale commented 8 years ago

Hello, I'm very interested on this role. I was using puppet for Oracle provisioning but now I'm more involved on Ansible.

I couldn't make it work for me.

Could you provide your Oracle linux box? I think there's something wrong with mine, I'm using this box: https://atlas.hashicorp.com/terrywang/boxes/oraclelinux-6-x86_64

Error:

TASK [oracle-database : file] **************************************************
failed: [test01] => (item=/home/oracle/oracle_inventory) => {"failed": true, "item":          "/home/oracle/oracle_inventory", "module_stderr": "", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "parsed": false}
failed: [test01] => (item=/home/oracle/product) => {"failed": true, "item": "/home/oracle/product",    "module_stderr": "", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "parsed": false}
failed: [test01] => (item=/home/oracle/product/oracle_home) => {"failed": true, "item":    "/home/oracle/product/oracle_home", "module_stderr": "", "module_stdout": "sudo: a password is   required\r\n", "msg": "MODULE FAILURE", "parsed": false}

Vagrantfile

config.vm.define "test01" do |test01|
    test01.vm.box = "terrywang/oraclelinux-6-x86_64"

    test01.vm.provider "virtualbox" do |vb|
      vb.cpus = 1
      vb.memory = "1500"
    end

    test01.vm.provision "ansible" do |ansible|
      ansible.playbook = "main.yml"
      ansible.galaxy_role_file = "roles.yml"
      ansible.sudo = true
     ansible.sudo_user = "root"
   end
 end
jeqo commented 8 years ago

I think you can use "ask_sudo_pass" in vagrant configuration if you know root's password. I have put my base box as public: https://atlas.hashicorp.com/jeqo/boxes/ol7-ansible

If you want to check what it contains: https://github.com/jeqo/packer-linux Scripts and kickstart file have all packages installed. I'm using Oracle Linux 7.2

Let me know how it goes.

Cheers!

jeqo commented 8 years ago

Check if this image works for you: https://atlas.hashicorp.com/jeqo/boxes/oracle-database-11g-se-ol7 it has already installed Oracle Database 11g (11.2.0.4) Standard Edition in OL7, and you can use configureinstance and configurelistener tags if you want to create a new instance.

jeqo commented 8 years ago

I will close this. Let me know if it's resolved to reopen.