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