This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: loadbalancer | |
become: true | |
tasks: | |
- name: install nginx | |
yum: name=epel-release state=present | |
yum: name=nginx state=present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[opc@vm04 ansible]$ ansible-playbook loadbalancer.yml | |
[WARNING]: While constructing a mapping from /home/opc/ansible/loadbalancer.yml, line | |
5, column 7, found a duplicate dict key (yum). Using last defined value only. | |
PLAY [loadbalancer] ************************************************************ | |
TASK [setup] ******************************************************************* | |
ok: [129.146.34.164] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: loadbalancer | |
become: true | |
tasks: | |
- name: install epel | |
yum: name=epel-release state=present | |
tasks: | |
-name: install nginx | |
yum: name=nginx state=present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: loadbalancer | |
become: true | |
tasks: | |
- name: install epel | |
yum: name=epel-release state=present | |
tasks: | |
-name: install nginx | |
yum: name=nginx state=present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[opc@vm04 ansible]$ ansible-playbook loadbalancer.yml | |
[WARNING]: While constructing a mapping from /home/opc/ansible/loadbalancer.yml, line | |
2, column 3, found a duplicate dict key (tasks). Using last defined value only. | |
PLAY [loadbalancer] ************************************************************ | |
TASK [setup] ******************************************************************* | |
ok: [129.146.34.164] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: loadbalancer | |
become: true | |
tasks: | |
- name: install epel | |
yum: name=epel-release state=present | |
tasks: | |
- name: install nginx | |
yum: name=nginx state=present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[opc@vm04 ansible]$ ansible-playbook loadbalancer.yml | |
[WARNING]: While constructing a mapping from /home/opc/ansible/loadbalancer.yml, line | |
2, column 3, found a duplicate dict key (tasks). Using last defined value only. | |
PLAY [loadbalancer] ************************************************************ | |
TASK [setup] ******************************************************************* | |
ok: [129.146.34.164] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: loadbalancer | |
become: true | |
tasks: | |
- name: install epel | |
yum: name=epel-release state=present | |
- name: install nginx | |
yum: name=nginx state=present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[opc@vm04 ansible]$ ansible-playbook loadbalancer.yml | |
PLAY [loadbalancer] ************************************************************ | |
TASK [setup] ******************************************************************* | |
ok: [129.146.34.164] | |
TASK [install epel] ************************************************************ | |
fatal: [129.146.34.164]: FAILED! => {"changed": false, "failed": true, "msg": "No packag e matching 'epel-release' found available, installed or updated", "rc": 126, "results": ["No package matching 'epel-release' found available, installed or updated"]} | |
to retry, use: --limit @/home/opc/ansible/loadbalancer.retry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: loadbalancer | |
become: true | |
tasks: | |
- name: install epel | |
yum: rpm -ivh epel-release-7-9.noarch.rpm | |
yum: name=epel-release state=present | |
- name: install nginx | |
yum: name=nginx state=present |