summaryrefslogtreecommitdiff
path: root/ansible/icktool.yml
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-09-13 15:32:36 +0300
committerLars Wirzenius <liw@liw.fi>2021-09-13 15:32:36 +0300
commit8b8b41a34d1015b33380469485cda4e449ec9bc2 (patch)
tree1d86c39314f752e456dafa24d239d954a9eac80e /ansible/icktool.yml
parent5a6827d02a1db0e1e0ac09f8abb3cfa996418c58 (diff)
downloadansibleness-8b8b41a34d1015b33380469485cda4e449ec9bc2.tar.gz
icktool: configure more
Sponsored-by: author
Diffstat (limited to 'ansible/icktool.yml')
-rw-r--r--ansible/icktool.yml41
1 files changed, 40 insertions, 1 deletions
diff --git a/ansible/icktool.yml b/ansible/icktool.yml
index b8e1503..6c97cc3 100644
--- a/ansible/icktool.yml
+++ b/ansible/icktool.yml
@@ -16,7 +16,46 @@
- jq
- name: "clone liw-ci"
shell: |
- sudo -i -u liw git clone git://git.liw.fi/liw-ci
+ if ! [ -e /home/liw/liw-ci ]
+ then
+ sudo -i -u liw git clone git://git.liw.fi/liw-ci
+ fi
+ - name: "install ick-statut"
+ copy:
+ content: |
+ #!/bin/bash
+ set -euo pipefail
+ icktool status | grep -v -e "done" -e "dummy-"
+ dest: /home/liw/ick-status
+ owner: liw
+ group: liw
+ mode: 0755
+ - name: "create ~/.config/icktool"
+ file:
+ state: directory
+ path: /home/liw/.config/icktool
+ owner: liw
+ group: liw
+ - name: "install icktool config"
+ copy:
+ content: |
+ config:
+ controller: https://ci-prod-controller.vm.liw.fi
+ dest: /home/liw/.config/icktool/icktool.yaml
+ owner: liw
+ group: liw
+ mode: 0644
+ - name: "install icktool credentials"
+ copy:
+ content: |
+ [https://ci-prod-controller.vm.liw.fi/token]
+ client_id = liw
+ client_secret = {{ lookup('pipe', 'pass ick2/admin_secret') }}
+ dest: /home/liw/.config/icktool/credentials.conf
+ owner: liw
+ group: liw
+ mode: 0600
+
vars:
ansible_python_interpreter: /usr/bin/python3