I am very new to Ansible. I am trying to follow the Ansible Role Concept Guide. I have the following master book:
--- # Master Playbook for Webservers
- hosts: apacheweb
user: test
sudo: yes
connection: ssh
roles:
- webservers
Which refers to the web server role, which has the following /main.yml task:
- name: Install Apache Web Server
yum: pkg=httpd state=latest
notify: Restart HTTPD
And the /main.yml handler:
- name: Restart HTTPD
service: name=httpd state=started
When I execute the master book mentioned above, I get the following error:
TASK [webservers : Install Apache Web Server] **********************************
fatal: [test.server.com]: FAILED! => {"changed": false, "failed": true, "msg": "The following packages have pending transactions: httpd-x86_64", "rc": 128, "results": ["The following packages have pending transactions: httpd-x86_64"]}
I cannot figure out what corresponds to this error. In my opinion, it seems that nothing like this was similar to my research, which could offer a problem with the way I use the Yum module.
NOTE: Possible version:
ansible 2.2.1.0
config file = /etc/ansible/ansible.cfg
source
share