Download:
child 8:bd870b027188
parent 6:802e874c8c26
7:a2442a06678e
Anton Shestakov <av6@dwimlabs.net>, Fri, 01 Apr 2016 01:56:30 +0800
pre_tasks: use lineinfile instead of echo with shell

1 файлов изменено, 1 вставок(+), 1 удалений(-) [+]
playbook-example.yml file | annotate | diff | comparison | revisions
--- a/playbook-example.yml Fri Apr 01 01:55:45 2016 +0800
+++ b/playbook-example.yml Fri Apr 01 01:56:30 2016 +0800
@@ -11,7 +11,7 @@
- name: Set hostname
hostname: name={{ hostname }}
- name: Update /etc/hosts
- shell: echo '127.0.0.1 {{ hostname }}' >> /etc/hosts
+ lineinfile: dest=/etc/hosts line="127.0.0.1 {{ hostname }} hg.{{ hostname }}"
# NOTE: this role depends on nginx and supervisor packages being installed,
# and also it uses two handlers: