Created
July 14, 2014 06:45
-
-
Save yuuichi-fujioka/9f90d3952c5a40c6a17e to your computer and use it in GitHub Desktop.
enforce hsotname by inventory
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: set hostname | |
hostname: name={{inventory_hostname}} | |
- name: set hostname to hosts | |
lineinfile: dest=/etc/hosts regexp='.*127.0.1.1.*' line='127.0.1.1 {{inventory_hostname}}' state=present |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment