On 5/13/20 9:32 AM, Eric Chang wrote:
> like I said , I want to update
nodes.ma <
http://nodes.ma> with somevalue based on location in playbook , if ma is not
> defined.
> ma is matainer's id , owner is customer's id.
> with different location , there are different matainers.
> and because some reason , we didn't keep all that records , so there are plenty of missing maintainers
> I want to update these data via ansible , if ma is missing , then I will assign a employee to it based on location.
> thats what I want to do.
>
How does your playbook look like right now?
Regards
Racke
>
>
> Dick Visser於 2020年5月13日星期三 UTC+8下午3時04分42秒寫道:
>
> Update vars files based on the content of a variable it contains
> sounds like doing things backwards.
> Could you tell more about your ACTUAL deployment goal(s)? I.e. what
> are you trying to achieve with ansible?
>
> On Wed, 13 May 2020 at 03:34, Eric Chang <
chan...@gmail.com <javascript:>> wrote:
> >
> > I have a var file like
> >
> > nodes:
> > - name: rk12
> > location: tp-101
> > ma:
> > own:
> > - name: rk14
> > location: tp-201
> > ma: p11023
> > own: p11023
> > - name: rk15
> > location: tc-332
> > ma:
> > own: p92032
> >
> >
> >
> >
> > and I want to update
nodes.ma <
http://nodes.ma> with somevalue based on location in playbook , if ma is not defined.
> > I try lineinfile , but there could be more lines that ma was not defined. (like rk12 , rk15 )
> > can I update specified
nodes.ma <
http://nodes.ma> in playbook ?
> >
>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>
> --
> 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-proje...@googlegroups.com <mailto:
ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/ansible-project/d1aba12f-0f26-4b5b-8c83-c45d542553e0%40googlegroups.com
> <
https://groups.google.com/d/msgid/ansible-project/d1aba12f-0f26-4b5b-8c83-c45d542553e0%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.