아 죄송합니다, 네, 프라이빗 저장소입니다. 저는 거의 그런 일을 하지 않거든요! 아마도 그 작업의 쓸모없음에 대해 부끄러웠던 것 같습니다… ![]()
해당 파일은 다음과 같습니다:
---
- hosts: all
vars:
ansible_python_interpreter: auto_silent
tasks:
- name: Update server OS (apt update && apt dist-upgrade && apt autoremove && apt autoclean)
become: yes
apt:
update-cache: yes
upgrade: dist
autoremove: yes
autoclean: yes
# - name: Update Discourse code from GitHub (cd /var/discourse && git pull)
# become: yes
# git:
# repo: 'https://github.com/discourse/discourse_docker.git'
# dest: /var/discourse
# update: yes
# version: master
# register: gitcommit
# - name: Rebuild the Discourse container (cd /var/discourse && ./launcher rebuild app)
# become: yes
# shell: ./launcher rebuild app
# args:
# chdir: /var/discourse
# when: gitcommit.changed
# - name: Clean up stopped containers (cd /var/discourse && ./launcher cleanup)
# become: yes
# shell: echo Y | ./launcher cleanup
# args:
# chdir: /var/discourse
# - name: Reboot machine with default Ansible settings
# reboot:
# become: yes
보시다시피, 현재 상태로는 거의 쓸모없는 수준입니다.
OS 업데이트, Discourse 업데이트, 런처 클린업 및 (보너스 포인트로) 각 Discourse 인스턴스의 Changelog에 기록하는 기능을 자동화하기 위한 공유 스크립트 개발에 관심이 있다면, 저는 도와줄 의향이 있습니다. 저 혼자서라면 제 자신의 Ansible 플레이북을 유지보수하는 것이 그다지 가치 있다고 생각되지 않습니다.