Compare commits
3 Commits
4e7f33338e
...
c7203f58ff
Author | SHA1 | Date | |
---|---|---|---|
c7203f58ff
|
|||
2e0d83cca1
|
|||
35882ca1a9 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
.*.swp
|
.*.swp
|
||||||
*.retry
|
*.retry
|
||||||
|
vars_auth.yml
|
||||||
|
7
inv.yml
7
inv.yml
@@ -6,6 +6,12 @@ all:
|
|||||||
ssh_args: -o ControlMaster=auto -o ControlPersist=60s
|
ssh_args: -o ControlMaster=auto -o ControlPersist=60s
|
||||||
# ansible_host: 192.168.122.139
|
# ansible_host: 192.168.122.139
|
||||||
unpriv_user: thoto
|
unpriv_user: thoto
|
||||||
|
ed-c7-2:
|
||||||
|
ansible_user: root
|
||||||
|
ansible_host: ed-c7-2.virt.uller.thoto.net
|
||||||
|
# ansible_host: 192.168.123.60 # + jumphost
|
||||||
|
ssh_args: -o ControlMaster=auto -o ControlPersist=60s
|
||||||
|
unpriv_user: thoto
|
||||||
children:
|
children:
|
||||||
htcondor:
|
htcondor:
|
||||||
hosts:
|
hosts:
|
||||||
@@ -16,3 +22,4 @@ all:
|
|||||||
cobald:
|
cobald:
|
||||||
hosts:
|
hosts:
|
||||||
ed-c7-1:
|
ed-c7-1:
|
||||||
|
ed-c7-2:
|
||||||
|
15
play.yml
15
play.yml
@@ -1,11 +1,23 @@
|
|||||||
---
|
---
|
||||||
- hosts: all
|
- hosts: all
|
||||||
|
vars_files: ['vars-auth.yml']
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: "install epel repo" # for htop etc.
|
||||||
|
yum:
|
||||||
|
name: epel-release
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: "install tools"
|
- name: "install tools"
|
||||||
yum:
|
yum:
|
||||||
name: [ vim-enhanced, htop, screen, bind-utils, nmap-ncat, net-tools ]
|
name: [ vim-enhanced, htop, screen, bind-utils, nmap-ncat, net-tools ]
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- name: "install ssh-key"
|
||||||
|
authorized_key:
|
||||||
|
user: thoto
|
||||||
|
key: "{{ssh_key}}"
|
||||||
|
state: present
|
||||||
|
|
||||||
- hosts: htcondor
|
- hosts: htcondor
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: "install htcondor repo"
|
- name: "install htcondor repo"
|
||||||
@@ -57,6 +69,9 @@
|
|||||||
|
|
||||||
- hosts: cobald
|
- hosts: cobald
|
||||||
roles:
|
roles:
|
||||||
|
- name: "setup docker"
|
||||||
|
role: docker
|
||||||
|
tags: docker
|
||||||
- name: "install cobald"
|
- name: "install cobald"
|
||||||
role: cobald
|
role: cobald
|
||||||
tags: cobald
|
tags: cobald
|
||||||
|
11
roles/cobald/library/TODO.md
Normal file
11
roles/cobald/library/TODO.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Tests
|
||||||
|
ANSIBLE_LIBRARY=. ansible -m influx_bucket -a "base='http://192.168.122.140:28086' org='my-org' auth_token='87-fEnSlQldFi1T_CLHsrHxH-T9VKey-qzUbVH6tmR2QzL4oZzbUPwzS1wzOoIkyfmyGbRv75yLjYfztxziivw==' name='bucky' description='test 123'" localhost -vvv
|
||||||
|
ANSIBLE_LIBRARY=. ansible -m influx_token -a "base='http://192.168.122.140:28086' org='my-org' auth_token='87-fEnSlQldFi1T_CLHsrHxH-T9VKey-qzUbVH6tmR2QzL4oZzbUPwzS1wzOoIkyfmyGbRv75yLjYfztxziivw==' key='foo' description='test 123' permissions=\"{{'[{\\\"action\\\": \\\"write\\\",\\\"resource\\\": {\\\"type\\\": \\\"buckets\\\"} }]'|from_json}}\"" localhost -vvv
|
||||||
|
ANSIBLE_LIBRARY=. ansible -m influx_dashboard -create -a "base='http://192.168.122.140:28086' org='my-org' token='2Mji-PvTzgn2oie5p36pJ-vxqWCnxczMWGrnYz2nUHj6Q6XvdIGiLPmK4DjX16KGhOjxQ5dWymDusE8qJrhFFg==' data='{{lookup(\"file\", \"../files/influxdb-dashboard-cobald.json\")}}'" localhost -vvv
|
||||||
|
Missing: lot of stuff, e.g. missing tokens, invalid data like bucket instead of buckets ...
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
* tests
|
||||||
|
* state (present/absent)
|
||||||
|
* `module_utils/urls.py` (https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/urls.py)
|
||||||
|
* see module notes
|
@@ -1,3 +0,0 @@
|
|||||||
ANSIBLE_LIBRARY=. ansible -m influx_bucket -a "base='http://192.168.122.140:28086' org='my-org' auth_token='87-fEnSlQldFi1T_CLHsrHxH-T9VKey-qzUbVH6tmR2QzL4oZzbUPwzS1wzOoIkyfmyGbRv75yLjYfztxziivw==' name='bucky' description='test 123'" localhost -vvv
|
|
||||||
ANSIBLE_LIBRARY=. ansible -m influx_token -a "base='http://192.168.122.140:28086' org='my-org' auth_token='87-fEnSlQldFi1T_CLHsrHxH-T9VKey-qzUbVH6tmR2QzL4oZzbUPwzS1wzOoIkyfmyGbRv75yLjYfztxziivw==' key='foo' description='test 123' permissions=\"{{'[{\\\"action\\\": \\\"write\\\",\\\"resource\\\": {\\\"type\\\": \\\"buckets\\\"} }]'|from_json}}\"" localhost -vvv
|
|
||||||
ANSIBLE_LIBRARY=. ansible -m influx_dashboard -create -a "base='http://192.168.122.140:28086' org='my-org' token='2Mji-PvTzgn2oie5p36pJ-vxqWCnxczMWGrnYz2nUHj6Q6XvdIGiLPmK4DjX16KGhOjxQ5dWymDusE8qJrhFFg==' data='{{lookup(\"file\", \"../files/influxdb-dashboard-cobald.json\")}}'" localhost -vvv
|
|
@@ -36,7 +36,8 @@
|
|||||||
- add_host:
|
- add_host:
|
||||||
name: ed-influxdb-2
|
name: ed-influxdb-2
|
||||||
ansible_connection: docker
|
ansible_connection: docker
|
||||||
ansible_docker_extra_args: "-H=ssh://ed-c7-1.virt.magni.thoto.net" # FIXME
|
# ansible_docker_extra_args: "-H=ssh://ed-c7-1.virt.magni.thoto.net" # FIXME
|
||||||
|
ansible_docker_extra_args: "-H=ssh://{{ansible_host}}" # FIXME
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
|
||||||
- wait_for: # FIXME: does not work right -> fetch token fails
|
- wait_for: # FIXME: does not work right -> fetch token fails
|
||||||
|
Reference in New Issue
Block a user