diff --git a/tasks/main.yml b/tasks/main.yml index 57ea069..4d41860 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -69,7 +69,7 @@ content: "" dest: /etc/resolv.conf tags: dns - when: ansible_distribution == "Debian" + when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu" - name: set hostname command: "hostname {{ hostname }}" @@ -83,13 +83,13 @@ file: path: /etc/network state: directory - when: ansible_distribution == "Debian" + when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu" - name: new /etc/network/interfaces template: src: interfaces.t dest: /etc/network/interfaces - when: ansible_distribution == "Debian" + when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu" - name: new /etc/resolv.conf template: @@ -107,22 +107,23 @@ template: src: hosts.t dest: /etc/hosts - when: ansible_distribution == "Debian" + when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu" tags: dns - name: new /etc/resolv.conf template: src: resolv.conf.t dest: /etc/resolv.conf - when: ansible_distribution == "Debian" + when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu" tags: dns - name: remove ssh host keys shell: "rm /etc/ssh/ssh_host*key*" + failed_when: no - name: create new ssh host keys command: "dpkg-reconfigure openssh-server" - when: ansible_distribution == "Debian" + when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu" - name: create new ssh host keys systemd_service: