METRON-1784: Re-allow remote ssh and scp in Centos full dev (mmiklavc via mmiklavc) closes apache/metron#1204
Project: http://git-wip-us.apache.org/repos/asf/metron/repo Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/4f0b608d Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/4f0b608d Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/4f0b608d Branch: refs/heads/feature/METRON-1090-stellar-assignment Commit: 4f0b608d77ebed3025ba0accedec440b3270cb18 Parents: 08fe1cf Author: mmiklavc <michael.miklav...@gmail.com> Authored: Wed Sep 26 16:34:13 2018 -0600 Committer: Michael Miklavcic <michael.miklav...@gmail.com> Committed: Wed Sep 26 16:34:13 2018 -0600 ---------------------------------------------------------------------- .../roles/enable-remote-ssh/defaults/main.yml | 18 +++++++++++ .../roles/enable-remote-ssh/tasks/main.yml | 33 ++++++++++++++++++++ .../development/centos6/ansible/playbook.yml | 5 +-- 3 files changed, 54 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/metron/blob/4f0b608d/metron-deployment/ansible/roles/enable-remote-ssh/defaults/main.yml ---------------------------------------------------------------------- diff --git a/metron-deployment/ansible/roles/enable-remote-ssh/defaults/main.yml b/metron-deployment/ansible/roles/enable-remote-ssh/defaults/main.yml new file mode 100644 index 0000000..f176095 --- /dev/null +++ b/metron-deployment/ansible/roles/enable-remote-ssh/defaults/main.yml @@ -0,0 +1,18 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--- +sshd_config_file: /etc/ssh/sshd_config http://git-wip-us.apache.org/repos/asf/metron/blob/4f0b608d/metron-deployment/ansible/roles/enable-remote-ssh/tasks/main.yml ---------------------------------------------------------------------- diff --git a/metron-deployment/ansible/roles/enable-remote-ssh/tasks/main.yml b/metron-deployment/ansible/roles/enable-remote-ssh/tasks/main.yml new file mode 100644 index 0000000..be83aa2 --- /dev/null +++ b/metron-deployment/ansible/roles/enable-remote-ssh/tasks/main.yml @@ -0,0 +1,33 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--- +- name: Comment password auth no + lineinfile: + dest: "{{ sshd_config_file }}" + regexp: "^PasswordAuthentication no" + line: "#PasswordAuthentication no" + +- name: Uncomment password auth yes + lineinfile: + dest: "{{ sshd_config_file }}" + regexp: "^#PasswordAuthentication yes" + line: "PasswordAuthentication yes" + +- name: Restart service sshd, in all cases + service: + name: sshd + state: restarted http://git-wip-us.apache.org/repos/asf/metron/blob/4f0b608d/metron-deployment/development/centos6/ansible/playbook.yml ---------------------------------------------------------------------- diff --git a/metron-deployment/development/centos6/ansible/playbook.yml b/metron-deployment/development/centos6/ansible/playbook.yml index fa14677..562fb1d 100644 --- a/metron-deployment/development/centos6/ansible/playbook.yml +++ b/metron-deployment/development/centos6/ansible/playbook.yml @@ -17,7 +17,8 @@ --- - hosts: all roles: - - role: libselinux-python - - role: enable-swap + - { role: libselinux-python, tags: libselinux-python } + - { role: enable-swap, tags: enable-swap } + - { role: enable-remote-ssh, tags: enable-remote-ssh } - include: ../../../ansible/playbooks/metron_full_install.yml