diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..bc93d69 Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index c086d7a..27edffa 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,49 @@ +Role Name +========= Ansible role for installing multicore Apache Solr -=============================================== + This playbook is based on a great tutorial written by 2bits. http://2bits.com/articles/configuring-apache-solr-4x-drupal-password-authentication.html Thanks guys! +Requirements +------------ + +* Ansible (tested on 1.6) + - http://docs.ansible.com/intro_installation.html +* Ubuntu (tested on 12.04 LTS) + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). + Disclaimer ---------- Even if the script does some security related configuration I don't guarantee @@ -22,34 +60,12 @@ Provides - Installation path - Configuring core names and types (default/drupal) * Support for Drupal's Solr modules (apachesolr/search\_api\_solr) - - Solr version 4.x only + - Solr version 4.x only - Config files are fetched from search\_api\_solr/solr-conf/4.x * Vagrantfile for testing and development * Ansible hosts file that points to the Vagrant box -Requires ------------- -* Ansible (tested on 1.6) - - http://docs.ansible.com/intro_installation.html -* Ubuntu (tested on 12.04 LTS) -* Vagrant (*optional*, tested on 1.5.1) - - https://docs.vagrantup.com/v2/getting-started/index.html - -Usage - Vagrant -------------- -1. Clone the repository -2. Cd to the cloned folder and run: - ``` - $ vagrant up - ``` -3. Run - ``` - $ ansible-playbook -i hosts play.yml --private-key=~/.vagrant.d/insecure_private_key - ``` -4. After the script is run wait for a while for Apache Solr to start -4. Navigate to http://192.168.56.107:8983/solr with your browser - -Usage - Remote server +Usage --------------------- 1. Clone the repository 2. Cd to the cloned folder diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index cded173..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,13 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.configure("2") do |config| - config.vm.box = "precise64" - config.vm.box_url = "http://files.vagrantup.com/precise64.box" - config.vm.network :forwarded_port, guest: 8983, host: 8983 - config.vm.network "private_network", ip: "192.168.56.107" - config.vm.provider "virtualbox" do |v| - v.customize ["modifyvm", :id, "--cpus", "2"] - v.customize ["modifyvm", :id, "--memory", "1024"] - end -end diff --git a/roles/jiv_e.solr/defaults/main.yml b/defaults/main.yml similarity index 100% rename from roles/jiv_e.solr/defaults/main.yml rename to defaults/main.yml diff --git a/roles/jiv_e.solr/handlers/main.yml b/handlers/main.yml similarity index 100% rename from roles/jiv_e.solr/handlers/main.yml rename to handlers/main.yml diff --git a/hosts b/hosts deleted file mode 100644 index cb41459..0000000 --- a/hosts +++ /dev/null @@ -1 +0,0 @@ -192.168.56.107 diff --git a/meta/main.yml b/meta/main.yml new file mode 100644 index 0000000..94908f6 --- /dev/null +++ b/meta/main.yml @@ -0,0 +1,134 @@ +galaxy_info: + author: + description: + + license: license (GPLv2) + + min_ansible_version: 1.2 + + + # + # Below are all platforms currently available. Just uncomment + # the ones that apply to your role. If you don't see your + # platform on this list, let us know and we'll get it added! + # + #platforms: + #- name: EL + # versions: + # - all + # - 5 + # - 6 + # - 7 + #- name: GenericUNIX + # versions: + # - all + # - any + #- name: Solaris + # versions: + # - all + # - 10 + # - 11.0 + # - 11.1 + # - 11.2 + # - 11.3 + #- name: Fedora + # versions: + # - all + # - 16 + # - 17 + # - 18 + # - 19 + # - 20 + # - 21 + # - 22 + # - 23 + #- name: Windows + # versions: + # - all + # - 2012R2 + #- name: SmartOS + # versions: + # - all + # - any + #- name: opensuse + # versions: + # - all + # - 12.1 + # - 12.2 + # - 12.3 + # - 13.1 + # - 13.2 + #- name: Amazon + # versions: + # - all + # - 2013.03 + # - 2013.09 + #- name: GenericBSD + # versions: + # - all + # - any + #- name: FreeBSD + # versions: + # - all + # - 10.0 + # - 10.1 + # - 10.2 + # - 8.0 + # - 8.1 + # - 8.2 + # - 8.3 + # - 8.4 + # - 9.0 + # - 9.1 + # - 9.1 + # - 9.2 + # - 9.3 + #- name: Ubuntu + # versions: + # - all + # - lucid + # - maverick + # - natty + # - oneiric + # - precise + # - quantal + # - raring + # - saucy + # - trusty + # - utopic + # - vivid + #- name: SLES + # versions: + # - all + # - 10SP3 + # - 10SP4 + # - 11 + # - 11SP1 + # - 11SP2 + # - 11SP3 + #- name: GenericLinux + # versions: + # - all + # - any + #- name: Debian + # versions: + # - all + # - etch + # - jessie + # - lenny + # - squeeze + # - wheezy + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is + # a keyword that describes and categorizes the role. + # Users find roles by searching for tags. Be sure to + # remove the '[]' above if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of + # alphanumeric characters. Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. + # Be sure to remove the '[]' above if you add dependencies + # to this list. diff --git a/play.yml b/play.yml deleted file mode 100644 index 29fca1d..0000000 --- a/play.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Test roles - hosts: all - remote_user: vagrant - sudo: True - - roles: - - jiv_e.solr diff --git a/roles/jiv_e.solr/tasks/configure-drupal-cores.yml b/tasks/configure-drupal-cores.yml similarity index 100% rename from roles/jiv_e.solr/tasks/configure-drupal-cores.yml rename to tasks/configure-drupal-cores.yml diff --git a/roles/jiv_e.solr/tasks/install-solr.yml b/tasks/install-solr.yml similarity index 100% rename from roles/jiv_e.solr/tasks/install-solr.yml rename to tasks/install-solr.yml diff --git a/roles/jiv_e.solr/tasks/main.yml b/tasks/main.yml similarity index 86% rename from roles/jiv_e.solr/tasks/main.yml rename to tasks/main.yml index 7b87d98..5b2872a 100644 --- a/roles/jiv_e.solr/tasks/main.yml +++ b/tasks/main.yml @@ -1,14 +1,8 @@ ---- -# Installing - name: Install Apache Solr include: install-solr.yml when: not jiv_solr__uninstall -# Uninstalling - - name: If updateSolr variable is set to uninstall the Apache Solr instance include: uninstall-solr.yml when: jiv_solr__uninstall - - diff --git a/roles/jiv_e.solr/tasks/uninstall-solr.yml b/tasks/uninstall-solr.yml similarity index 100% rename from roles/jiv_e.solr/tasks/uninstall-solr.yml rename to tasks/uninstall-solr.yml diff --git a/roles/jiv_e.solr/templates/4.x/elevate.xml b/templates/4.x/elevate.xml similarity index 100% rename from roles/jiv_e.solr/templates/4.x/elevate.xml rename to templates/4.x/elevate.xml diff --git a/roles/jiv_e.solr/templates/4.x/mapping-ISOLatin1Accent.txt b/templates/4.x/mapping-ISOLatin1Accent.txt similarity index 100% rename from roles/jiv_e.solr/templates/4.x/mapping-ISOLatin1Accent.txt rename to templates/4.x/mapping-ISOLatin1Accent.txt diff --git a/roles/jiv_e.solr/templates/4.x/protwords.txt b/templates/4.x/protwords.txt similarity index 100% rename from roles/jiv_e.solr/templates/4.x/protwords.txt rename to templates/4.x/protwords.txt diff --git a/roles/jiv_e.solr/templates/4.x/schema.xml b/templates/4.x/schema.xml similarity index 100% rename from roles/jiv_e.solr/templates/4.x/schema.xml rename to templates/4.x/schema.xml diff --git a/roles/jiv_e.solr/templates/4.x/schema_extra_fields.xml b/templates/4.x/schema_extra_fields.xml similarity index 100% rename from roles/jiv_e.solr/templates/4.x/schema_extra_fields.xml rename to templates/4.x/schema_extra_fields.xml diff --git a/roles/jiv_e.solr/templates/4.x/schema_extra_types.xml b/templates/4.x/schema_extra_types.xml similarity index 100% rename from roles/jiv_e.solr/templates/4.x/schema_extra_types.xml rename to templates/4.x/schema_extra_types.xml diff --git a/roles/jiv_e.solr/templates/4.x/solrconfig.xml b/templates/4.x/solrconfig.xml similarity index 100% rename from roles/jiv_e.solr/templates/4.x/solrconfig.xml rename to templates/4.x/solrconfig.xml diff --git a/roles/jiv_e.solr/templates/4.x/solrconfig_extra.xml b/templates/4.x/solrconfig_extra.xml similarity index 100% rename from roles/jiv_e.solr/templates/4.x/solrconfig_extra.xml rename to templates/4.x/solrconfig_extra.xml diff --git a/roles/jiv_e.solr/templates/4.x/solrcore.properties b/templates/4.x/solrcore.properties similarity index 100% rename from roles/jiv_e.solr/templates/4.x/solrcore.properties rename to templates/4.x/solrcore.properties diff --git a/roles/jiv_e.solr/templates/4.x/stopwords.txt b/templates/4.x/stopwords.txt similarity index 100% rename from roles/jiv_e.solr/templates/4.x/stopwords.txt rename to templates/4.x/stopwords.txt diff --git a/roles/jiv_e.solr/templates/4.x/synonyms.txt b/templates/4.x/synonyms.txt similarity index 100% rename from roles/jiv_e.solr/templates/4.x/synonyms.txt rename to templates/4.x/synonyms.txt diff --git a/roles/jiv_e.solr/templates/core.properties.j2 b/templates/core.properties.j2 similarity index 100% rename from roles/jiv_e.solr/templates/core.properties.j2 rename to templates/core.properties.j2 diff --git a/roles/jiv_e.solr/templates/iptables/solr-allowed-hosts.j2 b/templates/iptables/solr-allowed-hosts.j2 similarity index 100% rename from roles/jiv_e.solr/templates/iptables/solr-allowed-hosts.j2 rename to templates/iptables/solr-allowed-hosts.j2 diff --git a/roles/jiv_e.solr/templates/solr-init.d.sh.j2 b/templates/solr-init.d.sh.j2 similarity index 100% rename from roles/jiv_e.solr/templates/solr-init.d.sh.j2 rename to templates/solr-init.d.sh.j2 diff --git a/roles/jiv_e.solr/templates/solr.xml.j2 b/templates/solr.xml.j2 similarity index 100% rename from roles/jiv_e.solr/templates/solr.xml.j2 rename to templates/solr.xml.j2 diff --git a/tests/inventory b/tests/inventory new file mode 100644 index 0000000..d18580b --- /dev/null +++ b/tests/inventory @@ -0,0 +1 @@ +localhost \ No newline at end of file diff --git a/tests/test.yml b/tests/test.yml new file mode 100644 index 0000000..5d91e3e --- /dev/null +++ b/tests/test.yml @@ -0,0 +1,5 @@ +- hosts: localhost + vars_files: + - '../defaults/main.yml' + tasks: + - include: '../tasks/main.yml'