Thanks guys in ended up using lininfile since i just wanted it at the
bottom of the profile. Including the command just incase anyone else wants
to see the format.
- name: Add a line to profile
lineinfile:
path: /etc/profile
line: PATH=<PATH TO ADD>:$PATH
On Wednesday, October 3, 2018 at 8:39:37 AM UTC-4, Brad Van Orden wrote:
>
> There are several. File module as Kuldip suggested. lineinfile is
> another. replace is another. Your best bet is to change /etc/profile.
> Easiest way is to copy and edit as how you want. Place in your files
> directory and then just use the copy module to copy it to the target
> systems. That way is the simplest and you guarantee all systems will have
> the same /etc/profile.
>
> Regards,
>
> Brad
>
> On Tuesday, October 2, 2018 at 4:58:20 PM UTC-4, Jorge Duran wrote:
>
>> Hey guys,
>>
>> very new to ansible and still learning Linux. I am creating a playbook
>> to setup an High Performance Cluster, but as part of it i need to add some
>> folders to the path for all users on a bunch of RHEL 7 boxes. Is there a
>> module for this in ansible?
>>
>
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/a9f42d93-9438-4381-894e-6c0ab1c39daa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.