Difference between revisions of "Blockinfile:"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
− | - | + | - blockinfile: |
path: /path/to/your_file | path: /path/to/your_file | ||
state: present | state: present | ||
− | [[insertafter:]] EOF | + | [[insertafter:]] [[EOF]] |
− | [[content:]] | + | [[content:]] | |
− | + | your first line | |
− | + | your second line | |
+ | your third line | ||
Revision as of 13:32, 21 October 2021
- blockinfile: path: /path/to/your_file state: present insertafter: EOF content: | your first line your second line your third line
- blockinfile: | dest=/etc/network/interfaces backup=yes content="iface eth0 inet static address 192.168.0.1 netmask 255.255.255.0"
Related
See also
- Ansible: modules, plugins, Playbooks (examples)
ansible-playbook
,ansible-vault
,ansible-inventory
,ansible-config
, Ansible Tower, Ansible Galaxy (Roles) (ansible-galaxy
),ansible-cmdb
,gather facts
,ansible.cfg
,Ansible Molecule
, Ansible collections,register
,template
,--ask-pass
,--ask-become-pass
,remote_user:
,/etc/ansible/hosts
,ansible-doc
,ansible-lint
,.ansible/
,--forks
,--start-at-task
,changelog
,inventory
,Notify:
,ansible HOSTNAME -m ping
,gathering
,/usr/bin/ansible
,ansible -m ping
,ansible.builtin
,hosts: (Ansible)
,set fact:
,when:
,blockinfile:
,become method:
,include:
,git:
, AWX,ansible --help
, Tags, Ansible variables, versions
Advertising: