diff --git a/handlers/main.yml b/handlers/main.yml index 3fb9ad9..96bdc6f 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,5 +1,5 @@ --- - name: "Restart gearman" service: "name=gearman-job-server state=restarted" - sudo: yes + become: yes ignore_errors: yes diff --git a/tasks/main.yml b/tasks/main.yml index 6cad580..48f550a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,21 +1,21 @@ --- - name: "Install gearman packages" apt: "pkg=gearman state=present update_cache=yes cache_valid_time=3600" - sudo: yes + become: yes - name: "Populate gearman defaults" template: "src=etc/default/gearman-job-server dest=/etc/default/gearman-job-server owner=root group=root" notify: - "Restart gearman" - sudo: yes + become: yes - name: "Ensure that gearman is enabled" service: "name=gearman-job-server enabled=yes" - sudo: yes + become: yes - name: "Ensure that gearman is running" service: "name=gearman-job-server state=started" - sudo: yes + become: yes - name: "Flush handlers" meta: flush_handlers