I have 2 EC2 server instances where 1 I am using ansible to install mysql 
on the other ec2 instance.
ISSUE TYPE

Bug Report
COMPONENT NAME
   
   - Installing mySQL on AWS EC2 Linux

ANSIBLE VERSION

ansible 2.6.5
CONFIGURATION

So this is what I have so far

  - hosts: database
  sudo: yes

  tasks:
    - name: Install mySQL repo
      yum: 
name=http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm 
state=present

    - name: Install mySQL
      yum: pkg={{ item }}
      with_items:
        - mysql-community-server
        - mysql-community-client
        - MySQL-python

    - name: start mySQL service
      action: service name=mysqld state=started

    - name: copy my.cnf
      template: src=.my.cnf dest=/root/.my.cnf owner=root mode=0600

    - name: Create database user
      mysql_user: name=bob password=12345 priv=*.*:ALL state=present 
login_user=root login_password=Password123_#

And this is my .my.cnf

[client]
user=root
password=Password123_#

Im getting this error everytime

fatal: [FAILED! => {"changed": false, "msg": "unable to connect to database, 
check login_user and login_password are correct or /root/.my.cnf has the 
credentials. Exception message: (1045, \"Access denied for user 
'root'@'localhost' (using password: NO)\")"}
        to retry, use: --limit @/etc/an

OS / ENVIRONMENT

Linux AMI

Is this supported on EC2 AWS?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/25f91ac6-d49c-4db4-b996-cecd90c8c27e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to