You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

32 lines
878 B

  1. ---
  2. - name: Add repo file
  3. template: src=mariadb_ubuntu.list.j2 dest=/etc/apt/sources.list.d/mariadb.list owner=root group=root mode=0644
  4. register: mariadb_list
  5. - name: Add repo key
  6. apt_key: id=C74CD1D8 url=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF1656F24C74CD1D8 state=present
  7. register: mariadb_key
  8. - name: Update apt cache
  9. apt: update_cache=yes
  10. when: mariadb_list.changed == True or mariadb_key.changed == True
  11. - name: Unattended package installation
  12. shell: export DEBIAN_FRONTEND=noninteractive
  13. changed_when: false
  14. - name: Install MariaDB
  15. apt:
  16. pkg:
  17. - mariadb-server
  18. - mariadb-client
  19. - libmariadbclient18
  20. state: present
  21. - name: Install MySQLdb Python package for secure installations.
  22. apt:
  23. pkg:
  24. - python3-mysqldb
  25. state: present
  26. when: mysql_secure_installation and mysql_root_password is defined