liberty_shop.yml 2.57 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
---
- name: Setup mariadb
  hosts: all
  become: yes
  roles:
    - role: geerlingguy.mysql
  vars:
    mysql_enabled_on_startup: true
    mysql_packages:
      - mycli
      - mariadb-client
      - mariadb-server
    mysql_root_password_update: true
    mysql_users:
      - name: woops
        host: localhost
        password: 12345678
        priv: "woops.*:ALL"
    mysql_databases:
      - name: woops
        encoding: utf8
        collation: utf8_unicode_ci
    overwrite_global_mycnf: true

- name: Setup and configuration of PHP
  become: yes
  hosts: all
  roles:
    - geerlingguy.php
    - geerlingguy.php-xdebug
    - geerlingguy.mailhog
    - geerlingguy.apache-php-fpm
  vars:
    project_tag: "Liberty Shop"
    sendmail_path: "{{ mailhog_install_dir }}/mhsendmail"
    php_enable_php_fpm: true
    php_fpm_listen: "127.0.0.1:9000"
    php_fpm_listen_allowed_clients: "127.0.0.1"
    php_packages_extra: 
            - php-mysql
            - php-intl
            - php-pear
            - php-imagick
            - php-imap
            - php-mcrypt
            - php-memcache
            - php-pspell
            - php-recode
            - php-sqlite3
            - php-tidy
            - php-xmlrpc
            - php-xsl
    php_enable_webserver: true
    apache_vhosts:
      - servername: "woops.puri.sm"
        documentroot: "/var/www/woops.puri.sm"
        extra_parameters: |
              ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000/var/www/woops.puri.sm"

- name: Create and setup a wordpress site with woocommerce
  become: yes
  hosts: all
  roles:
    - oefenweb.wordpress
  vars:
    wordpress_installs:
      - name: woops.puri.sm
        dbname: woops
        dbuser: woops
        dbpass: 12345678
        dbhost: localhost
        path: /var/www/woops.puri.sm
        owner: vagrant
        group: vagrant
        recurse: false
        url: http://woops.puri.sm
        title: Purism Liberty Shop
        admin_name: admin
        admin_email: admin@puri.sm
        admin_password: 'MyPa55Pra5e'
        themes:
          - name: twentytwelve
            activate: true
        plugins:
          - name: woocommerce
            activate: true
87 88
          - name: jwt-authentication-for-wp-rest-api
            activate: true
89
        users: {}
90
        options: 
Noe Nieto's avatar
Noe Nieto committed
91 92 93 94 95 96 97 98 99
          - name: woocommerce_api_enabled
            command: update
            value: yes
          - name: swoocommerce_email_from_name
            command: update
            vakue: payments@mycompany.com
          - name: woocommerce_currency
            command: update
            vakue: MXN
100
        queries: []