Skip to content
Snippets Groups Projects
main.yml 730 B
Newer Older
  • Learn to ignore specific revisions
  • ---
    # file: roles/mysql-client/tasks/main.yml
    
    
    - name: "MySQL Client Role"
      set_fact: role_mysql_client_started=true
    
      - name: "MySQL Client | Install required packages"
    
    jurgenhaas's avatar
    jurgenhaas committed
        apt: pkg={{item}} state=present
    
        with_items:
          - mysql-client
          - mytop
    
      - name: "MySQL Client | Config for easy access for admins"
        template:
          src=admin_my_cnf
          dest=/home/{{ item }}/.my.cnf
          owner={{ item }}
          group=root
    
        with_items: '{{ admins }}'
    
      - name: "MySQL Client | Config for easy access for root"
        template:
          src=admin_my_cnf
          dest=/root/.my.cnf
          owner=root
          group=root
    
    
      when: '"mysql-client" not in excluded_roles'