Professional Documents
Culture Documents
.score.sh is given as
-1 #!/bin/bash
pass=0;
fail=0;
if [ $? -eq 0 ];then
if [[ ! -z ${worker} ]];then
((pass++))
else
((fail++))
fi;
if [[ ! -z ${master} ]];then
((pass++))
else
((fail++))
fi;
if [[ ! -z ${serverup} ]];then
((pass++))
else
((fail++))
fi;
if [[ ! -z ${serverurl} ]];then
((pass++))
else
((fail++))
fi;
fi;
score=$(( $pass * 25 ))
echo "FS_SCORE:$score%"
i was only able to install nginx and postgresql but not satisy the conditions given in .score.sh
Can
someone help me how do I install nginx as both master worker node and master and direct it to
google?
https://stackoverflow.com/questions/63546894/write-tasks-to-install-nginx-and-postgresql-using-ansible-playbook 1/4
6/29/2021 write tasks to install nginx and postgresql using ansible-playbook - Stack Overflow
Share Edit Follow Flag edited Aug 23 '20 at 12:36 asked Aug 23 '20 at 12:23
ilias-sp kalyani reddy
4,208 3 18 37 1 1 2
2 There are Ansible modules that can do the tasks you are running through the script. Specifically -
service, uri, etc.
– seshadri_c
Aug 24 '20 at 4:06
This worked for me and the fresco course did get passed for me.
0 ---
tags: nginx
service:
name: nginx
state: started
tags: PostgreSQL
service:
name: postgresql
state: started
Hi I am running the same command given above but not all Test case getting a pass
below is
result
0
nginx is running as worker
2 2
https://stackoverflow.com/questions/63546894/write-tasks-to-install-nginx-and-postgresql-using-ansible-playbook 2/4
6/29/2021 write tasks to install nginx and postgresql using ansible-playbook - Stack Overflow
FS_SCORE:50%
---
tags: nginx
service:
name: nginx
state: started
tags: PostgreSQL
service:
name: postgresql
state: started
^ here
Share Edit Follow Flag edited Feb 24 at 2:25 answered Feb 23 at 12:43
bguiz user15267116
23k 40 141 229 1
https://stackoverflow.com/questions/63546894/write-tasks-to-install-nginx-and-postgresql-using-ansible-playbook 3/4
6/29/2021 write tasks to install nginx and postgresql using ansible-playbook - Stack Overflow
Share Edit Follow Flag edited Aug 25 '20 at 14:16 answered Aug 25 '20 at 14:10
supraja
11 3
All the answers give above works on installing nginx, the problem is nginx is running port 80 and
the score script check 9090. If you curl using port 80 you will get response. So you need to find
0 some way to change the nginx conf file to use port 9090.
https://stackoverflow.com/questions/63546894/write-tasks-to-install-nginx-and-postgresql-using-ansible-playbook 4/4