Created
January 7, 2015 06:01
-
-
Save tridevgurung/67116488ad1af803c80d to your computer and use it in GitHub Desktop.
Ansible yml playbook to change all the hosts present in servers to /22
This file contains 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
- hosts: | |
servers | |
user: user | |
sudo: yes | |
port: 2020 | |
gather_facts: false | |
tasks: | |
- name: Change subnet into /22 | |
lineinfile: dest=/etc/network/interfaces regexp='netmask 255.255.254.0' line='netmask 255.255.252.0' | |
- name: Restarting networking service | |
command: /etc/init.d/networking restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment