Created
January 27, 2017 19:01
-
-
Save eiri/074bc4896b9c9e9b35b70cbd8003797b to your computer and use it in GitHub Desktop.
Insert arbitrary lines in middle of file with ansible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: activate erlang 17.5 on login | |
lineinfile: | |
dest: /home/vagrant/.bashrc | |
line: "{{item.line}}" | |
insertafter: "{{item.insertafter}}" | |
state: present | |
with_items: | |
- insertafter: "#alias l='ls -CF'" | |
line: '# activate erlang 17.5' | |
- insertafter: '# activate erlang 17.5' | |
line: 'source /opt/erlang/17.5/activate' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment