Comments (6)
create a file called main.yml in roles/tomcat/vars and include ' http_port=<port_no.>'
from ansible-examples.
Hi,
I have resolved the issue as below
Steps
- Create 'vars' directory in roles/tomcat
[root@instance-1 vars]# pwd
/home/user/ansible-tomcat/roles/tomcat/vars
- Copy the group_vars/tomcat-servers file to /roles/tomcat/vars/main.yml file
[root@instance-1 vars]# cat main.yml
# Here are variables related to the Tomcat installation
http_port: 8086
https_port: 8443
# This will configure a default manager-gui user:
admin_username: admin
admin_password: adminsecret
from ansible-examples.
@rashbhat : how can i pass the host info using dynamic inventory? any thoughts?
#ansible-pull -d /home/gvenka008c/reponame --key-file=/home/users/rsa.id -U [email protected]:reponame.git playbook.yml
[WARNING]: provided hosts list is empty, only localhost is available
from ansible-examples.
TASK [tomcat : Configure Tomcat server] *************************************************************************************************************************************
task path: /root/ansible-examples/tomcat-standalone/roles/tomcat/tasks/main.yml:25
fatal: [Git]: FAILED! => {
"changed": false,
"failed": true,
"msg": "AnsibleUndefinedVariable: 'http_port' is undefined"
}
fatal: [jenkin]: FAILED! => {
"changed": false,
"failed": true,
"msg": "AnsibleUndefinedVariable: 'http_port' is undefined"
}
fatal: [nagios]: FAILED! => {
"changed": false,
"failed": true,
"msg": "AnsibleUndefinedVariable: 'http_port' is undefined"
}
to retry, use: --limit @/root/ansible-examples/tomcat-standalone/site.retry
PLAY RECAP ******************************************************************************************************************************************************************
Git : ok=11 changed=0 unreachable=0 failed=1
jenkin : ok=11 changed=0 unreachable=0 failed=1
nagios : ok=11 changed=0 unreachable=0 failed=1
[root@centos var]# cat main.yml
#re variables related to the Tomcat installation
include : http_port:8080
include : https_port:8443
# This will configure a default manager-gui user:
#
# admin_username: admin
# admin_password: adminsecret
#
[root@centos var]# pwd
/root/ansible-examples/tomcat-standalone/roles/tomcat/var
[root@centos var]#
I created file under create a file called main.yml in roles/tomcat/vars . Please help me to fix this error!
from ansible-examples.
Thanks It worked :)
from ansible-examples.
syamv -I faced the same issue and followed the same which you posted above. issue no more persisting.. but wanted to know why it is not taking the vars from group_vars folder wanted to know that can some one explain me
from ansible-examples.
Related Issues (20)
- set hostname to multiple hosts using ansible HOT 2
- The rabbitmq.yml example should also demonstrate installing the correct Erlang version
- task and role dir naming conventions
- Ansible for AWS HOT 4
- ansible-lint errors in wordpress-nginx/site.yml
- ios_config is not working in Ansible
- TASK [mongod : Start the mongodb service] ERROR HOT 1
- checking OSR(Operating system files) permission
- Registry settings required on all servers
- Test
- Add "best practices" example of separate staging/production inventories HOT 3
- SRE-Ansible To Install ELK Stack
- Inclusive language
- Wrong file name HOT 1
- Input parameters for the example playbooks are undocumented HOT 1
- Create a shell script that runs an ansible ad hac to create yum repository HOT 1
- no example of import_tasks or strategy HOT 1
- Ansible
- copy files from linux server to file shared on windows server HOT 1
- ansible-examples should adhere to the standards of the ansible-linter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-examples.