From 9ccd1a79e24e40635a9a2e0293c7e4c34dd86161 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Tue, 26 May 2020 00:41:41 +0200 Subject: [PATCH] Move standalone playbooks to utils --- {docker => utils}/ntpdate.yml | 4 ++-- {docker => utils}/reboot.yml | 6 +++--- update.yml => utils/update.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) rename {docker => utils}/ntpdate.yml (79%) rename {docker => utils}/reboot.yml (77%) rename update.yml => utils/update.yml (77%) diff --git a/docker/ntpdate.yml b/utils/ntpdate.yml similarity index 79% rename from docker/ntpdate.yml rename to utils/ntpdate.yml index 8462132..6bb0819 100644 --- a/docker/ntpdate.yml +++ b/utils/ntpdate.yml @@ -1,6 +1,6 @@ --- - name: update date - hosts: docker_swarm + hosts: all become_method: sudo become_user: root become: yes @@ -11,4 +11,4 @@ cmd: | ntpdate 192.168.50.3 args: - executable: /bin/bash \ No newline at end of file + executable: /bin/bash diff --git a/docker/reboot.yml b/utils/reboot.yml similarity index 77% rename from docker/reboot.yml rename to utils/reboot.yml index 551b39d..26d7a9d 100644 --- a/docker/reboot.yml +++ b/utils/reboot.yml @@ -1,6 +1,6 @@ --- - name: reboot nodes - hosts: docker_swarm + hosts: docker_cluster become_method: sudo become_user: root become: yes @@ -10,7 +10,7 @@ - name: drain docker swarm shell: cmd: | - docker node update {{ docker_node }} --availability drain + docker node update {{ ansible_hostname }} --availability drain sleep 30 - name: reboot @@ -32,5 +32,5 @@ - name: drain docker swarm shell: cmd: | - docker node update {{ docker_node }} --availability active + docker node update {{ ansible_hostname }} --availability active sleep 30 diff --git a/update.yml b/utils/update.yml similarity index 77% rename from update.yml rename to utils/update.yml index 2f15510..e39076c 100644 --- a/update.yml +++ b/utils/update.yml @@ -1,6 +1,6 @@ --- - name: update software - hosts: docker_swarm, iron_man + hosts: all become_method: sudo become_user: root become: yes @@ -11,4 +11,4 @@ apt: update_cache: yes name: "*" - state: latest \ No newline at end of file + state: latest