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 @@
- name: Delete nameserver 8.8.8.8
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
shell: pkill dhclient
......
- include: uploadlog.yml
when: is_playbook_ok == "False"
when: is_playbook_ok in [False, "False"]
- include: rerun.yml
when: is_playbook_ok == "False"
when: is_playbook_ok in [False, "False"]
- name: Create /etc/opt dir
file: dest=/etc/opt mode=775 state=directory
......@@ -50,7 +50,7 @@
- include: hostname.yml
- include: user.yml
- include: sudo.yml
when: is_playbook_ok == "False"
when: is_playbook_ok in [False, "False"]
- include: ssh.yml
- file: path=/opt/upgrader state=directory
......
......@@ -48,15 +48,14 @@
- name: Check whether sshd_config is well configured
command: grep -wq "^PermitRootLogin no" /etc/ssh/sshd_config
register: permitrootlogin
always_run: True
ignore_errors: True
changed_when: False
when: is_playbook_ok == "False"
when: is_playbook_ok in [False, "False"]
- name: update /etc/ssh/sshd_config
lineinfile: dest=/etc/ssh/sshd_config regexp="^PermitRootLogin (.*)" line="PermitRootLogin no" state=present
notify:
- restart ssh
- 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 @@
with_items:
- slapos
- 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