Permalink
Browse files

Preseed the image with (old) python2 because ansible issues... Also m…

…ake sure the systemd service is stopped while deploying, otherwise it'll kill the instance mid-deployment because pcgr_consumer.py terminates itself. It will be up upon boot.
  • Loading branch information...
brainstorm committed Mar 2, 2018
1 parent 2ff7838 commit 50f6150a995dd3f7395b1622abe6e1559c7947b5
Showing with 7 additions and 1 deletion.
  1. +6 −0 ansible/aws-ami.yaml
  2. +1 −1 ansible/roles/common/tasks/main.yml
View
@@ -2,6 +2,12 @@
- hosts: localhost
connection: local
gather_facts: no
pre_tasks:
- name: Wait for automatic system updates
shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done;
- name: Seed ansible on remote instances (no python errors)
raw: sudo apt-get -y install python python-simplejson aptitude
- action: setup
tasks:
- name: Launch EC2 instance
ec2:
@@ -188,7 +188,7 @@
- name: Force systemd to reread configs and start PCGR consumer on boot
systemd:
daemon_reload: yes
state: started
state: stopped
name: pcgr
enabled: yes

0 comments on commit 50f6150

Please sign in to comment.