diff options
author | Lars Wirzenius <lwirzenius@wikimedia.org> | 2019-07-07 18:56:04 +0300 |
---|---|---|
committer | Lars Wirzenius <lwirzenius@wikimedia.org> | 2019-07-07 18:56:04 +0300 |
commit | 57e735b4cc32ee6266df005e54396d698c69ecca (patch) | |
tree | 5ffc868dd271794b73526c807c893f8bbc691fe7 | |
parent | c6bd729f0565c12af68a20857928a96f854063f5 (diff) | |
download | wmf-gitlab-57e735b4cc32ee6266df005e54396d698c69ecca.tar.gz |
Add: testuser@testenv and ssh access via deployer ssh key
-rw-r--r-- | components.yml | 1 | ||||
-rw-r--r-- | roles/apache2/tasks/main.yml | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/components.yml b/components.yml index 44947e2..ecdea68 100644 --- a/components.yml +++ b/components.yml @@ -5,6 +5,7 @@ - apache2 vars: hostname: testenv + deployer_ssh_pub: "{{ lookup('pipe', 'pass wmf/wmf-gitlab.vm.liw.fi/deployer_ssh.pub') }}" - hosts: artifacts remote_user: root diff --git a/roles/apache2/tasks/main.yml b/roles/apache2/tasks/main.yml index 2757ee4..7a08132 100644 --- a/roles/apache2/tasks/main.yml +++ b/roles/apache2/tasks/main.yml @@ -1,3 +1,14 @@ +- name: "create testuser account" + user: + name: testuser + password_lock: yes + +- name: "allow deployer access to testuser via ssh" + authorized_key: + user: testuser + key: "{{ deployer_ssh_pub }}" + exclusive: yes + - name: "create /srv/http" file: state: directory |