OK here it is.

I have build a server X expecting all the parameter are in place.

During validation and qualification phase the user who didn't build that
server has to cross check parameter using simple playbook to make sure
server has right chrony server IP address and other basic setting are in
place, if not validation has to fail and send notification to the server
builder to rectify the same.




Thank you.
Regards,
Siva


On Tue, 26 May 2020 at 16:50, Dick Visser <dick.vis...@geant.org> wrote:

> I don't understand what you are trying to achieve?
>
> You are trying to find out a server's region based on its configured ntp
> servers? But you already have inventory groups for each location.
>
> Can you describe your REAL goal, and include that mysterious build
> verification task as well. And the inventory.
>
> On Tue, 26 May 2020 at 05:11, Sivakumar Saravanamuthu <
> sivakuma...@gmail.com> wrote:
>
>> Hi
>>
>> I am writing a post build verification task and servers are located in
>> three difference location.
>>
>> US, EU and AU
>>
>> I want to check chrony.conf output so that if servers in group_names US
>> it should check chrony.conf file to see  server parameter is reflect NTP
>> server in that region and so on. How do I achieve this goal.
>>
>> In /var/main.yml I have following server list
>>
>> ntp_server1: "IP address based on location"
>> ntp_server2: "IP address based on location"
>> ntp_server3: "IP address based on location"
>> ntp_server4: "IP address based on location"
>> ntp_server5: "IP address based on location"
>> ntp_server6: "IP address based on location"
>>
>> in task/main.yml
>>
>> I have following task
>> - name: read the chrony file
>>   shell: grep 'server' /etc/chrony.conf
>>   register: source_one
>>
>> From here I don't know how to proceed further to check how ntp_server1 to
>> ntp_server6 based on location.
>>
>> I have jinja2 template in template directory
>>
>> {% if 'US' in group_names %}
>> server {{ ntp_server1 }}
>> server {{ ntp_server2 }}
>> {% elif 'AU' in group_names %}
>> server {{ ntp_server3 }}
>> server {{ ntp_server4 }}
>> {% else %}
>> server {{ ntp_server5 }}
>> server {{ ntp_server6 }}
>> {% endif %}
>>
>> Not sure how to integrate with the verification task.  Please help me how
>> to achieve verification outcome based on location.
>>
>> Regards,
>> Siva
>>
>> --
>> 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 ansible-project+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/197c96b3-51bf-43cd-b529-8015e3943814%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/197c96b3-51bf-43cd-b529-8015e3943814%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> Sent from a mobile device - please excuse the brevity, spelling and
> punctuation.
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwM968YYytDW5bAo6bbB%2BTNtJvx3_A03UfmRQKPdpiEypw%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAL8fbwM968YYytDW5bAo6bbB%2BTNtJvx3_A03UfmRQKPdpiEypw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CANnu9FFVBcpDdUMWB%3D6oPcrE4OO95Z7SthH%2BNp%2BVYuB_Cr-1zA%40mail.gmail.com.

Reply via email to