diff --git a/lightspeed.yml b/lightspeed.yml index 95856e3..e9d0b7f 100644 --- a/lightspeed.yml +++ b/lightspeed.yml @@ -27,4 +27,3 @@ # - name: configure bgp on ios using ios_bgp # - name: Merge provided OSPF Interfaces configuration -... diff --git a/linux-postinstall.yml b/linux-postinstall.yml index 3571c77..9ec7ec8 100644 --- a/linux-postinstall.yml +++ b/linux-postinstall.yml @@ -5,15 +5,15 @@ tasks: - name: Upgrade all packages ansible.builtin.yum: - name: '*' + name: "*" state: latest - name: Make sure firewalld service unit is running ansible.builtin.systemd: state: started name: firewalld - enabled: yes - + enabled: true + - name: Copy the sshd-banner file into place ansible.builtin.copy: src: files/sshd-banner @@ -21,27 +21,27 @@ owner: root group: root mode: u+rw,g-wx,o-wx - + - name: Updating the sshd_config file to show the new banner ansible.builtin.lineinfile: path: /etc/ssh/sshd_config state: present - regexp: '^#Banner none' - line: 'Banner /etc/ssh/sshd-banner' - + regexp: ^#Banner none + line: Banner /etc/ssh/sshd-banner + - name: Disabling root login via ssh ansible.builtin.lineinfile: path: /etc/ssh/sshd_config state: present - regexp: '^#PermitRootLogin yes' - line: 'PermitRootLogin no' - - - name: Reloading sshd service + regexp: ^#PermitRootLogin yes + line: PermitRootLogin no + + - name: Reloading sshd service ansible.builtin.systemd: state: reloaded name: sshd.service - enabled: yes - + enabled: true + - name: Copy the new /etc/motd into place ansible.builtin.copy: src: files/motd @@ -49,7 +49,7 @@ owner: root group: root mode: u+rw,g-wx,o-wx - + - name: Copy the new /etc/issue into place ansible.builtin.copy: src: files/issue @@ -65,7 +65,7 @@ owner: root group: root state: link - when: "ansible_distribution_release != 'Maipo'" - + when: ansible_distribution_release != 'Maipo' + - name: Unconditionally reboot the machine with all defaults - ansible.builtin.reboot: \ No newline at end of file + ansible.builtin.reboot: