Yum isn't seeing the 'mysql-server' package in any of its configured repos.
That's the right name for EL6 redhat/centos, maybe you're missing one of the
base repos?

Get that working first before you ask Ansible to install it, and
things will be ok.

On 3 February 2017 at 21:28, jithendra myla <[email protected]> wrote:
> Hi Marko,
>
> I updated with correct REDHAT packages, Sorry for confusion, now i get below
> error
>
>
>
> [ansible@centos1 playbooks]$ ansible-playbook mysql_server.yml -C
>
> PLAY [localhost]
> ***************************************************************
>
> TASK [setup]
> *******************************************************************
> ok: [localhost]
>
> TASK [mysql : Add the OS specific variables]
> ***********************************
> ok: [localhost]
>
> TASK [mysql : Install the mysql packages in Redhat derivatives]
> ****************
> failed: [localhost] (item=[u'libselinux-python', u'mysql-server',
> u'MySQL-python']) => {"changed": false, "failed": true, "item":
> ["libselinux-python", "mysql-server", "MySQL-python"], "msg": "No package
> matching 'mysql-server' found available, installed or updated", "rc": 126,
> "results": ["libselinux-python-2.5-6.el7.x86_64 providing libselinux-python
> is already installed", "No package matching 'mysql-server' found available,
> installed or updated"]}
>     to retry, use: --limit
> @/home/ansible/ansible/playbooks/mysql_server.retry
>
> PLAY RECAP
> *********************************************************************
> localhost                  : ok=2    changed=0    unreachable=0    failed=1
>
> [ansible@centos1 playbooks]$
>
> below are the redhat packages
>   - libselinux-python
>   - mysql-server
>   - MySQL-python
>
>
> On Thursday, February 2, 2017 at 12:35:09 PM UTC-5, jithendra myla wrote:
>>
>> Hello Sir/madam,
>>
>> I downloaded the ansible galaxy roles using ansible-galaxy install
>> bennojoy.mysql from https://galaxy.ansible.com/bennojoy/mysql/ ,
>> when i run it as below i get below error
>>
>> [ansible@centos1 playbooks]$ pwd
>> /home/ansible/ansible/playbooks
>> [ansible@centos1 playbooks]$ ls -ltr
>> -rw-rw-r--. 1 ansible ansible  148 Feb  2 12:14 mysql_server.yml
>> drwxrwxr-x. 8 ansible ansible  102 Feb  2 12:19 mysql
>> -rw-rw-r--. 1 ansible ansible   10 Feb  2 12:20 mysql_server.retry
>> [ansible@centos1 playbooks]$ ansible-playbook mysql_server.yml -C
>>
>> PLAY [localhost]
>> ***************************************************************
>>
>> TASK [setup]
>> *******************************************************************
>> ok: [localhost]
>>
>> TASK [mysql : Add the OS specific variables]
>> ***********************************
>> ok: [localhost]
>>
>> TASK [mysql : Install the mysql packages in Redhat derivatives]
>> ****************
>> failed: [localhost] (item=[u'mysql_pkgs']) => {"changed": false, "failed":
>> true, "item": ["mysql_pkgs"], "msg": "No package matching 'mysql_pkgs' found
>> available, installed or updated", "rc": 126, "results": ["No package
>> matching 'mysql_pkgs' found available, installed or updated"]}
>>     to retry, use: --limit
>> @/home/ansible/ansible/playbooks/mysql_server.retry
>>
>> PLAY RECAP
>> *********************************************************************
>> localhost                  : ok=2    changed=0    unreachable=0
>> failed=1
>>
>> [ansible@centos1 playbooks]$
>> [ansible@centos1 playbooks]$ cat mysql_server.yml
>> ---
>> - hosts: localhost
>>   roles:
>>   - {role: mysql, mysql_db: [{name: sql_first_db}], mysql_users: [{name:
>> sql1, pass: papa123, priv: "*.*:ALL"}] }
>> [ansible@centos1 playbooks]$
>>
>> [ansible@centos1 playbooks]$ cat mysql/vars/RedHat.yml
>> ---
>> mysql_pkgs:
>>   - libselinux-python
>>   - mysql-server
>>   - MySQL-python
>>
>> mysql_service: mysqld
>>
>> mysql_conf_dir: "/etc/"
>> [ansible@centos1 playbooks]$
>>
>>
>> not sure defining  a variable like above works, Can you please help me out
>>
>> Thank you very much for helping me
>>
>> -Jithendra Myla
>>
>>
>>
>>
>>
>>
> --
> 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/26c17e1a-4598-4419-9014-9296662c7f1e%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
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/CAK5eLPS58mpo590bhUv%3DgknFVj6Kwh-X_hjd0Y%2BrmPsczs%2Bhrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to