Skip to content

Commit

Permalink
Use systemd module instead of shell
Browse files Browse the repository at this point in the history
Using ansible systemd module to daemon reload and service reload is the solution for the future.

Change-Id: Ice457ab51c6d781024f2903e47deba48cfdbe352
  • Loading branch information
Cuong Nguyen committed Jan 23, 2017
1 parent 68444fc commit 1d0e284
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions handlers/main.yml
Expand Up @@ -13,15 +13,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Reload systemd daemon
command: "systemctl daemon-reload"
notify:
- Restart designate services

- name: Restart designate services
service:
systemd:
name: "{{ item.value.service_name }}"
state: "restarted"
daemon_reload: yes
with_dict: "{{ designate_services }}"
when: inventory_hostname in groups[item.value.group]
2 changes: 1 addition & 1 deletion tasks/designate_init_systemd.yml
Expand Up @@ -53,4 +53,4 @@
with_dict: "{{ designate_services }}"
when: inventory_hostname in groups[item.value.group]
notify:
- Reload systemd daemon
- Restart designate services

0 comments on commit 1d0e284

Please sign in to comment.