diff --git a/webapps/.travis.yml b/webapps/.travis.yml deleted file mode 100644 index 36bbf620..00000000 --- a/webapps/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/webapps/README.md b/webapps/README.md index 225dd44b..2c74fa01 100644 --- a/webapps/README.md +++ b/webapps/README.md @@ -1,38 +1,13 @@ -Role Name -========= +# webapps -A brief description of the role goes here. +Install popular webapps -Requirements ------------- +## Tasks -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. +Tasks are extracted in several files, included in `tasks/main.yml` : -Role Variables --------------- +* `wordpress.yml` : wordpress installation -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. +## Available variables -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). +* `webapp_wordpress_install` : enable wordpress installation diff --git a/webapps/defaults/main.yml b/webapps/defaults/main.yml index 333222a7..1c25888f 100644 --- a/webapps/defaults/main.yml +++ b/webapps/defaults/main.yml @@ -1,2 +1,6 @@ --- -# defaults file for webapps +webapps_wordpress_install: False +webapps_wordpress_version: 4.7-branch +webapps_wordpress_upstream: https://github.com/WordPress/WordPress +webapps_wordpress_upstream_default_title: "new blog Evolix SaaS" + diff --git a/webapps/tasks/main.yml b/webapps/tasks/main.yml index 75953890..a86da0fd 100644 --- a/webapps/tasks/main.yml +++ b/webapps/tasks/main.yml @@ -1,2 +1,4 @@ --- -# tasks file for webapps + +- include: wordpress.yml + when: webapps_wordpress_install diff --git a/webapps/tasks/wordpress.yml b/webapps/tasks/wordpress.yml index 7a16cd7d..e85433c1 100644 --- a/webapps/tasks/wordpress.yml +++ b/webapps/tasks/wordpress.yml @@ -1,22 +1,5 @@ ---- -- name: Installation of wordpress - hosts: '{{ hosts }}' - gather_facts: yes - - vars_files: - - './vars/default.yml' - - # TODO: create vars file - vars: - service: WordPress - version_service: 4.7-branch - url_service: https://github.com/WordPress/WordPress - site_title: "new blog Evolix SaaS" - - tasks: - - - name: Init global variables - include: './tasks/var_common.yml' + #- name: Init global variables + # include: './tasks/var_common.yml' - name: init dir_wpcli set_fact: dir_wpcli="{{ dir }}/wp-cli" @@ -25,13 +8,13 @@ when: debug_mode tags: debug_mode - - name: Git clone {{ service }} repository + - name: Git clone Wordpress repository include: './tasks/git.yml' vars: - service_git: "{{ service }}" - url_git: "{{ url_service }}" + service_git: WordPress + url_git: "{{ webapps_wordpress_upstream }}" dest_git: "{{ dir_www }}" - version_git: "{{ version_service }}" + version_git: "{{ webapps_wordpress_version }}" - name: Creation directory wp-cli file: >