diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-11-21 16:15:54 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-11-21 17:01:13 +0000 |
commit | 1f214f938a099488761ef5325dc41c0658f1a4ba (patch) | |
tree | ed8752c940455620d260afc3ef97589a5271d8c5 | |
parent | 6ace1d5cb4183eccc5b2eefc3293cfee41dac270 (diff) | |
download | infrastructure-1f214f938a099488761ef5325dc41c0658f1a4ba.tar.gz |
openid_provider: Disable SELinux and enable persistant Journal
Default SELinux policy seems to prevent the uWSGI process from reading
stuff in /srv and raises a bunch of errors for Cherokee trying to
connect() to its socket, too. It'd be possible to fix this but I'd
rather not bother, and since we don't use SELinux in Baserock it's not
super important anyway.
If you did want to fix this I'd suggest installing 'setroubleshoot' and
reading <https://fedoraproject.org/wiki/SELinux_FAQ> as a starting
point.
-rw-r--r-- | baserock_openid_provider/local.yml | 5 | ||||
-rw-r--r-- | baserock_openid_provider/packer_template.json | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/baserock_openid_provider/local.yml b/baserock_openid_provider/local.yml index ea468399..e1e69809 100644 --- a/baserock_openid_provider/local.yml +++ b/baserock_openid_provider/local.yml @@ -1,6 +1,11 @@ --- - hosts: localhost tasks: + - name: enable persistant journal + shell: mkdir /var/log/journal + args: + creates: /var/log/journal + - name: install Cherokee web server yum: name=cherokee state=latest diff --git a/baserock_openid_provider/packer_template.json b/baserock_openid_provider/packer_template.json index 97333a16..bb8c8b20 100644 --- a/baserock_openid_provider/packer_template.json +++ b/baserock_openid_provider/packer_template.json @@ -31,7 +31,7 @@ }, { "type": "shell", - "inline": [ "sudo yum install -y ansible"] + "inline": [ "sudo yum install -y ansible libselinux-python"] }, { "type": "ansible-local", @@ -47,6 +47,9 @@ { "type": "shell", "inline": [ + "sudo yum install libselinux-python", + "sudo ansible localhost -m selinux -a state=disabled", + "sudo setenforce 0", "sudo systemctl enable cherokee", "sudo systemctl start cherokee" ], |