Changeset - 8459fd0025e8
[Not reviewed]
0 2 0
Branko Majic (branko) - 3 years ago 2020-12-23 22:48:28
branko@majic.rs
MAR-168: Fix some linting errors.
2 files changed with 44 insertions and 44 deletions:
0 comments (0 inline, 0 general)
roles/database_server/molecule/default/prepare.yml
Show inline comments
 
@@ -22,52 +22,52 @@
 
  become: true
 
  tasks:
 

	
 
  - name: Install MariaDB
 
    apt:
 
      name:
 
        - mariadb-client
 
        - mariadb-server
 
        - python3-mysqldb
 
      state: present
 
    - name: Install MariaDB
 
      apt:
 
        name:
 
          - mariadb-client
 
          - mariadb-server
 
          - python3-mysqldb
 
        state: present
 

	
 
  - name: Enable and start MariaDB
 
    service:
 
      name: mysql
 
      state: started
 
      enabled: true
 
    - name: Enable and start MariaDB
 
      service:
 
        name: mysql
 
        state: started
 
        enabled: true
 

	
 
  - name: Set password for the root database user (creating separate entry for different hosts)
 
    mysql_user:
 
      check_implicit_admin: true
 
      name: root
 
      host: "{{ item }}"
 
      password: "root_password"
 
    with_items:
 
      - "localhost"
 
      - "127.0.0.1"
 
      - "::1"
 
      - "{{ ansible_hostname }}"
 
    - name: Set password for the root database user (creating separate entry for different hosts)
 
      mysql_user:
 
        check_implicit_admin: true
 
        name: root
 
        host: "{{ item }}"
 
        password: "root_password"
 
      with_items:
 
        - "localhost"
 
        - "127.0.0.1"
 
        - "::1"
 
        - "{{ ansible_hostname }}"
 

	
 
  - name: Deploy username and password for the root database user
 
    copy:
 
      src: "deprecated-root-my.cnf"
 
      dest: "/root/.my.cnf"
 
      owner: root
 
      group: root
 
      mode: 0400
 
    - name: Deploy username and password for the root database user
 
      copy:
 
        src: "deprecated-root-my.cnf"
 
        dest: "/root/.my.cnf"
 
        owner: root
 
        group: root
 
        mode: 0400
 

	
 
  - name: Disable use of unix socket login
 
    command: "mysql -B -e \"update mysql.user set plugin='' where user='root' and plugin='unix_socket'; flush privileges;\""
 
    - name: Disable use of unix socket login
 
      command: "mysql -B -e \"update mysql.user set plugin='' where user='root' and plugin='unix_socket'; flush privileges;\""
 

	
 
  - name: Create Debian system maintenance user
 
    mysql_user:
 
      name: debian-sys-maint
 
      password: debian-sys-maint-password
 
    - name: Create Debian system maintenance user
 
      mysql_user:
 
        name: debian-sys-maint
 
        password: debian-sys-maint-password
 

	
 
  - name: Deploy Debian system maintenance user login configuration
 
    copy:
 
      src: "deprecated-debian.cnf"
 
      dest: "/etc/mysql/debian.cnf"
 
      owner: root
 
      group: root
 
      mode: 0600
 
    - name: Deploy Debian system maintenance user login configuration
 
      copy:
 
        src: "deprecated-debian.cnf"
 
        dest: "/etc/mysql/debian.cnf"
 
        owner: root
 
        group: root
 
        mode: 0600
roles/database_server/molecule/default/tests/test_default.py
Show inline comments
 
@@ -143,7 +143,7 @@ def test_debian_system_maintenance_configuration_file(host):
 
    Tests if the Debian system maintenance configuration file has been
 
    set-up properly.
 
    """
 
    
 

	
 
    with host.sudo():
 
        config = host.file("/etc/mysql/debian.cnf")
 

	
0 comments (0 inline, 0 general)