Skip to content

Instantly share code, notes, and snippets.

@abondis
Created September 11, 2015 18:36
Show Gist options
  • Save abondis/711c2501e0d27cbb0009 to your computer and use it in GitHub Desktop.
Save abondis/711c2501e0d27cbb0009 to your computer and use it in GitHub Desktop.
ansible multiline lineinfile
# SSH config
# Not the best, but should be enough for my needs
- name: add a marker to replace later
lineinfile:
insertafter: "{{ sftp_config[[0, item|int -1]|max] }}"
dest: /etc/ssh/sshd_config
line: "{{ sftp_config[item|int] }}"
with_sequence: start=0 count=4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment