ansible-taler-exchange

Ansible playbook to deploy a production Taler Exchange
Log | Files | Refs | Submodules | README | LICENSE

main.yml (1229B)


      1 - name: Update apt cache
      2   apt:
      3     update_cache: true
      4 
      5 - name: Install depends
      6   apt:
      7     name: [ansible, git]
      8     state: present
      9 
     10 - name: Ensure /etc/ansible/facts.d exists
     11   file:
     12     path: /etc/ansible/facts.d
     13     state: directory
     14     recurse: true
     15     mode: "0700"
     16     owner: root
     17     group: root
     18 
     19 - name: Make /etc/ansible/facts.d/pull.fact
     20   template:
     21     src: pull.fact
     22     dest: /etc/ansible/facts.d/pull.fact
     23     mode: "0700"
     24     owner: root
     25     group: root
     26 
     27 - name: Recollect facts
     28   setup:
     29 
     30 - name: Install the ansible-pull script
     31   template:
     32     src: ansible-pull.sh
     33     dest: /usr/sbin/run-ansible-pull
     34     mode: "0755"
     35     owner: root
     36     group: root
     37 
     38 - name: Install cronjob
     39   cron:
     40     name: "Ansible Pull"
     41     minute: "{{ ansible_local.pull.minute | default(59 | random) }}"
     42     job: /usr/sbin/run-ansible-pull
     43 
     44 - name: Remove old ansible-pull on boot cronjob
     45   cron:
     46     name: run ansible on reboot
     47     state: absent
     48 
     49 - name: Install service to run ansible-pull on boot
     50   template:
     51     src: ansible-on-boot.service
     52     dest: /etc/systemd/system/ansible-on-boot.service
     53     mode: "0755"
     54     owner: root
     55     group: root
     56 
     57 - name: Enable ansible pull on boot
     58   service:
     59     name: ansible-on-boot
     60     enabled: true