From e7f00225e62b7f317a9ff840468883438a22893b Mon Sep 17 00:00:00 2001 From: Nikita Strelkov Date: Mon, 10 Oct 2016 23:50:09 +0500 Subject: [PATCH] Use yml dictionaries for "lineinfile" to increase readabylity --- ansible/roles/php/tasks/php-cli.yml | 14 ++++++++------ ansible/roles/vagrant_local/tasks/main.yml | 8 +++++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ansible/roles/php/tasks/php-cli.yml b/ansible/roles/php/tasks/php-cli.yml index 35b1daf..ae079f2 100755 --- a/ansible/roles/php/tasks/php-cli.yml +++ b/ansible/roles/php/tasks/php-cli.yml @@ -1,10 +1,12 @@ --- - name: enabling opcache cli - lineinfile: dest=/etc/php/7.0/cli/php.ini - regexp=';?opcache.enable=\d' - line='opcache.enable=1' + lineinfile: + dest: /etc/php/7.0/cli/php.ini + regexp: ';?opcache.enable=\d' + line: 'opcache.enable=1' - name: ensure timezone is set in cli php.ini - lineinfile: dest=/etc/php/7.0/cli/php.ini - regexp='date.timezone =' - line='date.timezone = {{ server.timezone }}' \ No newline at end of file + lineinfile: + dest: /etc/php/7.0/cli/php.ini + regexp: 'date.timezone =' + line: 'date.timezone = {{ server.timezone }}' \ No newline at end of file diff --git a/ansible/roles/vagrant_local/tasks/main.yml b/ansible/roles/vagrant_local/tasks/main.yml index cd53609..70cad53 100755 --- a/ansible/roles/vagrant_local/tasks/main.yml +++ b/ansible/roles/vagrant_local/tasks/main.yml @@ -8,4 +8,10 @@ when: vagrant_local.vm.hostname is defined - name: Update /etc/hosts - lineinfile: dest=/etc/hosts regexp='^127\.0\.0\.1' line='127.0.0.1 localhost {{ vagrant_local.vm.hostname }}' owner=root group=root mode=0644 + lineinfile: + dest: /etc/hosts + regexp: '^127\.0\.0\.1' + line: '127.0.0.1 localhost {{ vagrant_local.vm.hostname }}' + owner: root + group: root + mode: 0644