Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arnaud Véron
slapos.package
Commits
50dfdfc5
Commit
50dfdfc5
authored
Apr 11, 2017
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix check of bootstrap status variable with recent ansible version
parent
1ab211da
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
playbook/roles/vm-bootstrap/tasks/hostname.yml
playbook/roles/vm-bootstrap/tasks/hostname.yml
+1
-1
playbook/roles/vm-bootstrap/tasks/main.yml
playbook/roles/vm-bootstrap/tasks/main.yml
+3
-3
playbook/roles/vm-bootstrap/tasks/ssh.yml
playbook/roles/vm-bootstrap/tasks/ssh.yml
+2
-3
playbook/roles/vm-bootstrap/tasks/user.yml
playbook/roles/vm-bootstrap/tasks/user.yml
+1
-1
No files found.
playbook/roles/vm-bootstrap/tasks/hostname.yml
View file @
50dfdfc5
...
@@ -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
...
...
playbook/roles/vm-bootstrap/tasks/main.yml
View file @
50dfdfc5
-
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
...
...
playbook/roles/vm-bootstrap/tasks/ssh.yml
View file @
50dfdfc5
...
@@ -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
playbook/roles/vm-bootstrap/tasks/user.yml
View file @
50dfdfc5
...
@@ -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"]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment