Migrate from gitlab to gitea
This commit is contained in:
commit
6115a1d41c
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
ansible.cfg
|
||||
hosts
|
||||
site.yml
|
||||
*.retry
|
||||
3
README.md
Normal file
3
README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Ansible Playbooks for system maintenance tasks
|
||||
|
||||
Collections of Ansible Playbooks for routine maintenance and troubleshooting.
|
||||
3
playbooks/roles/centos_host/handlers/main.yml
Normal file
3
playbooks/roles/centos_host/handlers/main.yml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: update all packages
|
||||
yum: name=* state=latest
|
||||
18
playbooks/roles/centos_host/tasks/main.yml
Normal file
18
playbooks/roles/centos_host/tasks/main.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: install yum-cron and deltarpm
|
||||
yum: name={{ item }} state=latest
|
||||
with_items:
|
||||
- deltarpm
|
||||
- yum-cron
|
||||
|
||||
- name: set yum-cron to automatically apply update
|
||||
lineinfile: dest=/etc/yum/yum-cron.conf regexp="apply_updates = no" state=present line="apply_updates = yes" backrefs=yes
|
||||
|
||||
- name: enable epel
|
||||
yum: name=epel-release state=latest
|
||||
|
||||
- name: install development tools
|
||||
yum: name=@development-tools state=latest
|
||||
|
||||
- name: enable ius
|
||||
yum: name=https://centos7.iuscommunity.org/ius-release.rpm state=latest
|
||||
30
playbooks/roles/django_dev/tasks/main.yml
Normal file
30
playbooks/roles/django_dev/tasks/main.yml
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
- name: get ius repo install script (sponsored by rackspace)
|
||||
get_url: url=https://setup.ius.io/ dest={{ home }}ius-setup force=no
|
||||
|
||||
- name: enable ius repo
|
||||
shell: bash ius-setup removes={{ home }}ius-setup
|
||||
become: yes
|
||||
|
||||
- name: delete ius script file after install
|
||||
file: path={{ home }}ius-setup state=absent
|
||||
|
||||
- name: install python 3.5
|
||||
yum: name={{ item }} state=latest
|
||||
become: yes
|
||||
with_items:
|
||||
- python35u
|
||||
- python35u-pip
|
||||
- python-virtualenv
|
||||
|
||||
- name: create .virtualenv directory
|
||||
file: path={{ venv }} state=directory
|
||||
|
||||
- name: create virtualenv
|
||||
shell: pyvenv-3.5 {{ venv }}{{ project_name }} creates={{ venv }}{{ project_name }}
|
||||
|
||||
- name: create project directory
|
||||
file: path={{ home }}{{ project_name }} state=directory
|
||||
|
||||
- name: install django
|
||||
pip: name=django version=1.8 virtualenv={{ venv }}{{ project_name }}
|
||||
4
playbooks/roles/ssh_server/handlers/main.yml
Normal file
4
playbooks/roles/ssh_server/handlers/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
- name: restart sshd
|
||||
service: name=sshd state=restarted
|
||||
when: gssapi.changed or dns.changed
|
||||
10
playbooks/roles/ssh_server/tasks/main.yml
Normal file
10
playbooks/roles/ssh_server/tasks/main.yml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
- name: disable gss api authentication
|
||||
lineinfile: dest=/etc/ssh/sshd_config regexp='^GSSAPIAu' state=present line='GSSAPIAuthentication no' backrefs=yes
|
||||
register: gssapi
|
||||
notify: restart sshd
|
||||
|
||||
- name: disable dns lookup
|
||||
lineinfile: dest=/etc/ssh/sshd_config regexp='^#UseDNS\syes$' state=present line='UseDNS no' backrefs=yes
|
||||
register: dns
|
||||
notify: restart sshd
|
||||
Loading…
x
Reference in New Issue
Block a user