Opened 21 months ago
Last modified 10 months ago
#58 accepted Task
Update/Document Ansible Scripts.
Reported by: | D Delmar Davis | Owned by: | D Delmar Davis |
---|---|---|---|
Priority: | Priority | Milestone: | Make Shit Happen / Own Your Shit. |
Component: | Infrastructure | Keywords: | ansible, lxc, documentation |
Cc: | Joe Dumoulin |
Description (last modified by )
I need to make ansible do more work here and should probably make some documentation about my love (/FUCKING HATE) for ansible.
lets start here...
AnsibleScriptsForContainers.
Top of the list.
- <del>Check for and stop duplicate running containers.</del>Done.
- <del>Make nightly duplicates and cleanup any duplicates created.</del>Done.
- <del>(related) Shift containers between machines.</del> This can wait.
- <del>Adapt or r</del>Rewrite scripts *in python* to shift Host from kb2018 to <del>bs2020</del>aoc2024
- Make archives work with vm's as well as containers
- Document usage of existing scripts.
Change History (9)
comment:1 Changed 21 months ago by
Priority: | Important → Priority |
---|
comment:2 Changed 21 months ago by
Status: | assigned → accepted |
---|
comment:3 Changed 19 months ago by
comment:4 Changed 19 months ago by
Wrote crontab to keep Snapshots from running on bs2020:
root@bs2020:/home/feurig# cat /etc/cron.d/norunningsnapshots */2 * * * * root lxc list|grep RUN|grep Snapshot|sed 's/^| //'|cut -f1 -d' '|sed 's/^/lxc stop /'|sh
For some reason this did not work from kb2018
comment:5 Changed 18 months ago by
The ansible playbooks can be used on the home servers by using a localized inventory.
root@annie:/etc/ansible# ansible-playbook -i merlot.hosts playbooks/create-lxd-containers.yml
comment:6 Changed 18 months ago by
Migrating nightly snapshots to python only (using ansible runner to get host info and move container snapshots).
https://bitbucket.org/suspectdevicesadmin/ansible/src/master/python/NightlySnapshots.py
Once the cleanup scripts are finished I will crontab these.
comment:8 Changed 18 months ago by
Met NOOOOOO!
root@kb2018:~# crontab -l .... # m h dom mon dow command #@midnight /etc/ansible/python/NightlySnapshots.py 0 0 * * * /etc/ansible/python/NightlySnapshots.py
comment:9 Changed 10 months ago by
Description: | modified (diff) |
---|
The ansible playbooks on kb2018 should be generalized so that they can be used on the local servers. To do this I need to separate the playbooks from the configuration files. The configuration files should then be placed in their own repositories and the playbooks maintained as a sub module.
Refs