Commit 50dfdfc5 authored by Alain Takoudjou's avatar Alain Takoudjou

fix check of bootstrap status variable with recent ansible version

parent 1ab211da
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
- name: Delete nameserver 8.8.8.8 - name: Delete nameserver 8.8.8.8
lineinfile: dest=/etc/resolv.conf line="nameserver 8.8.8.8" state=absent lineinfile: dest=/etc/resolv.conf line="nameserver 8.8.8.8" state=absent
when: is_playbook_ok == "False" when: is_playbook_ok in [False, "False"]
- name: Turn off dhclient if it's running - name: Turn off dhclient if it's running
shell: pkill dhclient shell: pkill dhclient
......
- include: uploadlog.yml - include: uploadlog.yml
when: is_playbook_ok == "False" when: is_playbook_ok in [False, "False"]
- include: rerun.yml - include: rerun.yml
when: is_playbook_ok == "False" when: is_playbook_ok in [False, "False"]
- name: Create /etc/opt dir - name: Create /etc/opt dir
file: dest=/etc/opt mode=775 state=directory file: dest=/etc/opt mode=775 state=directory
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
- include: hostname.yml - include: hostname.yml
- include: user.yml - include: user.yml
- include: sudo.yml - include: sudo.yml
when: is_playbook_ok == "False" when: is_playbook_ok in [False, "False"]
- include: ssh.yml - include: ssh.yml
- file: path=/opt/upgrader state=directory - file: path=/opt/upgrader state=directory
......
...@@ -48,15 +48,14 @@ ...@@ -48,15 +48,14 @@
- name: Check whether sshd_config is well configured - name: Check whether sshd_config is well configured
command: grep -wq "^PermitRootLogin no" /etc/ssh/sshd_config command: grep -wq "^PermitRootLogin no" /etc/ssh/sshd_config
register: permitrootlogin register: permitrootlogin
always_run: True
ignore_errors: True ignore_errors: True
changed_when: False changed_when: False
when: is_playbook_ok == "False" when: is_playbook_ok in [False, "False"]
- name: update /etc/ssh/sshd_config - name: update /etc/ssh/sshd_config
lineinfile: dest=/etc/ssh/sshd_config regexp="^PermitRootLogin (.*)" line="PermitRootLogin no" state=present lineinfile: dest=/etc/ssh/sshd_config regexp="^PermitRootLogin (.*)" line="PermitRootLogin no" state=present
notify: notify:
- restart ssh - restart ssh
- restart sshd - restart sshd
when: is_playbook_ok == "False" and permitrootlogin.rc != 0 when: is_playbook_ok in [False, "False"] and permitrootlogin.rc != 0
...@@ -8,4 +8,4 @@ ...@@ -8,4 +8,4 @@
with_items: with_items:
- slapos - slapos
- nexedi - nexedi
when: is_playbook_ok == "False" when: is_playbook_ok in [False, "False"]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment