I tried to install rpm in ansible control machine to target machines using
playbook
- name: Install local rpm in server
yum: pkg=files/mod_jk-1.2.40-5.el6.x86_64.rpm state=present
when: ansible_os_family == 'RedHat'
I got error :
failed: [xyz.cloudapp.net] => {"changed": false, "failed": true, "rc": 0,
"results": []}
msg: No Package file matching 'files/mod_jk-1.2.40-5.el6.x86_64.rpm' found
on system
When I copied the same file in server and installed as local installation
it works.
- name: copy mod_jk rpm to server
copy: src=files/mod_jk-1.2.40-5.el6.x86_64.rpm
dest=/home/user/mod_jk-1.2.40-5.el6.x86_64.rpm owner=user group=azureuser
mode=755
when: ansible_os_family == 'RedHat'
- name: Install mod_jk local rpm in server
yum: name=/home/user/mod_jk-1.2.40-5.el6.x86_64.rpm state=present
when: ansible_os_family == 'RedHat'
Is there a way to directly install from control machine without copying it
--
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/11584396-9d2c-4444-8796-a2d8df576301%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.