---
- name: "create {{ mbstat.dirs.production }}/private/mbstat.info"
  file:
    path: "{{ mbstat.dirs.production }}/private/mbstat.info"
    state: touch
    owner: "root"
    group: "root"
    mode: '0700'

- name: "save to file {{ mbstat.dirs.production }}/private/mbstat.info"
  copy:
    dest: "{{ mbstat.dirs.production }}/private/mbstat.info"
    mode: 0700
    content: |
      stat url: http://{{ mbstat.subdomain }}.{{ billing.domain }}
                http://{{ ansible_default_ipv4.address }}
                https://{{ mbstat.subdomain }}.{{ billing.domain }}
      login: test
      password: test
      change login/password/database in {{ mbstat.files.config }}

- name: "show install info"
  debug:
    msg:
      - "mbstat url: http://{{ mbstat.subdomain }}.{{ billing.domain }}"
      - "          http://{{ ansible_default_ipv4.address }}"
      - "          https://{{ mbstat.subdomain }}.{{ billing.domain }}"
      - "login: test"
      - "password: test"
      - " "
      - "change login/password/database in {{ mbstat.files.config }}"
