On Sat, Apr 25, 2020 at 02:32:01PM -0700, Mitesh Bhandari wrote:
> *Following are the yml files & playbooks content:*
>
> [user@node0101 veriable_include]$ *cat varPackage.yml*
> ---
> vars:
> package: samba
> service: smb
> state: started
> enabled: true
>
> [user@node0101 veriable_include]$ *cat tasks.yml*
> ---
> - name: Install {{ vars.package }} package
> yum:
> name: "{{ vars.package }}"
> state: latest
> - name: Start {{ vars.service }} service
> service:
> name: "{{ vars.service }}"
> state: "{{ vars.state }}"
> enabled: "{{ vars.enabled }}"
vars is a reserved word in Ansible so you need to choose another name for your
variable.
--
Kai Stian Olstad
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/20200426203956.g5kazgapuce73ke2%40olstad.com.