Compare commits
4 Commits
a7ae583c20
...
9ef1c94855
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ef1c94855 | |||
| 28d6cfe5da | |||
| c94baae7ff | |||
| b201a21105 |
16
.devcontainer/devcontainer.json
Normal file
16
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "Ansible Development",
|
||||
"image": "mcr.microsoft.com/devcontainers/python:3.12",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/ansible:1": {}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"redhat.ansible",
|
||||
"ms-python.python"
|
||||
]
|
||||
}
|
||||
},
|
||||
"postCreateCommand": "pip install ansible-lint"
|
||||
}
|
||||
11
.vscode/settings.json
vendored
11
.vscode/settings.json
vendored
@@ -5,5 +5,14 @@
|
||||
"envManager": "ms-python.python:venv",
|
||||
"packageManager": "ms-python.python:pip"
|
||||
}
|
||||
]
|
||||
],
|
||||
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
|
||||
"python.pythonPath": "${workspaceFolder}/.venv/bin/python", // legacy fallback for older Python extension versions
|
||||
// Keep these Ansible executable paths absolute: parts of the extension use them verbatim.
|
||||
"ansible.ansiblePath": "/home/chris/devel/git/git.oopen.de/ansible/oopen-server/.venv/bin/ansible", // legacy fallback for older Ansible extension versions
|
||||
"ansible.ansibleLintPath": "/home/chris/devel/git/git.oopen.de/ansible/oopen-server/.venv/bin/ansible-lint", // legacy fallback for older Ansible extension versions
|
||||
"ansible.ansible.path": "/home/chris/devel/git/git.oopen.de/ansible/oopen-server/.venv/bin/ansible",
|
||||
"ansible.python.interpreterPath": "${workspaceFolder}/.venv/bin/python3",
|
||||
"ansible.validation.lint.path": "/home/chris/devel/git/git.oopen.de/ansible/oopen-server/.venv/bin/ansible-lint",
|
||||
"ansible.ansibleNavigator.path": "/home/chris/devel/git/git.oopen.de/ansible/oopen-server/.venv/bin/ansible-navigator"
|
||||
}
|
||||
|
||||
18
.vscode/settings.json.bak.20260327-152321
vendored
Normal file
18
.vscode/settings.json.bak.20260327-152321
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"python-envs.pythonProjects": [
|
||||
{
|
||||
"path": ".",
|
||||
"envManager": "ms-python.python:venv",
|
||||
"packageManager": "ms-python.python:pip"
|
||||
}
|
||||
],
|
||||
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
|
||||
"python.pythonPath": "${workspaceFolder}/.venv/bin/python", // legacy fallback for older Python extension versions
|
||||
// Keep these Ansible executable paths absolute: parts of the extension use them verbatim.
|
||||
"ansible.ansiblePath": "/home/chris/devel/git/git.oopen.de/ansible/oopen-server/.venv/bin/ansible", // legacy fallback for older Ansible extension versions
|
||||
"ansible.ansibleLintPath": "/home/chris/devel/git/git.oopen.de/ansible/oopen-server/.venv/bin/ansible-lint", // legacy fallback for older Ansible extension versions
|
||||
"ansible.ansible.path": "/home/chris/devel/git/git.oopen.de/ansible/oopen-server/.venv/bin/ansible",
|
||||
"ansible.python.interpreterPath": "${workspaceFolder}/.venv/bin/python3",
|
||||
"ansible.validation.lint.path": "/home/chris/devel/git/git.oopen.de/ansible/oopen-server/.venv/bin/ansible-lint",
|
||||
"ansible.ansibleNavigator.path": "/home/chris/devel/git/git.oopen.de/ansible/oopen-server/.venv/bin/ansible-navigator"
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
|
||||
# ---
|
||||
# Apache2 Server
|
||||
# ---
|
||||
@@ -7,31 +6,29 @@
|
||||
- name: Populate service facts
|
||||
ansible.builtin.service_facts:
|
||||
|
||||
#- name: Print service facts
|
||||
# ansible.builtin.debug:
|
||||
# var: ansible_facts.services
|
||||
# when:
|
||||
# - ansible_facts['services']['apache2.service']['name'] | default('not-found') != 'not-found'
|
||||
|
||||
# - name: Print service facts
|
||||
# ansible.builtin.debug:
|
||||
# var: ansible_facts.services
|
||||
# when:
|
||||
# - ansible_facts['services']['apache2.service']['name'] | default('not-found') != 'not-found'
|
||||
|
||||
- name: (apache2.yml) Ensure directory '/etc/systemd/system/apache2.service.d' is present
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: /etc/systemd/system/apache2.service.d
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
mode: "0755"
|
||||
when:
|
||||
- ansible_facts['services']['apache2.service']['name'] | default('not-found') != 'not-found'
|
||||
|
||||
|
||||
- name: (apache2.yml) Ensure file '/etc/systemd/system/apache2.service.d/limits.conf' exists
|
||||
copy:
|
||||
src: 'etc/systemd/system/apache2.service.d/limits.conf'
|
||||
dest: '/etc/systemd/system/apache2.service.d/limits.conf'
|
||||
ansible.builtin.copy:
|
||||
src: "etc/systemd/system/apache2.service.d/limits.conf"
|
||||
dest: "/etc/systemd/system/apache2.service.d/limits.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
mode: "0644"
|
||||
notify: "Restart apache2"
|
||||
when:
|
||||
- ansible_facts['services']['apache2.service']['name'] | default('not-found') != 'not-found'
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
---
|
||||
|
||||
- import_tasks: show.yml
|
||||
tags:
|
||||
- show
|
||||
- show
|
||||
|
||||
# tags supported inside basic.yml
|
||||
#
|
||||
@@ -13,7 +12,6 @@
|
||||
tags:
|
||||
- basic
|
||||
|
||||
|
||||
# tags supported inside apt.yml
|
||||
#
|
||||
# apt-update
|
||||
@@ -34,7 +32,6 @@
|
||||
- ansible_facts['distribution'] == "Debian"
|
||||
tags: apt
|
||||
|
||||
|
||||
# tags supported inside apt-gateway.yml:
|
||||
#
|
||||
#
|
||||
@@ -44,7 +41,6 @@
|
||||
- apt
|
||||
- apt-gateway-server
|
||||
|
||||
|
||||
#
|
||||
# yum-update
|
||||
# yum-base-install
|
||||
@@ -55,7 +51,6 @@
|
||||
- ansible_facts.distribution == "CentOS" or ansible_facts.distribution == "Fedora"
|
||||
tags: yum
|
||||
|
||||
|
||||
# tags supportetd inside caching-nameserver.yml
|
||||
#
|
||||
# apt-caching-nameserver
|
||||
@@ -65,7 +60,6 @@
|
||||
when: groups['caching_nameserver']|string is search(inventory_hostname)
|
||||
tags: caching-nameserver
|
||||
|
||||
|
||||
# tags supported inside systemd-resolved.yml
|
||||
#
|
||||
# systemd-resolved
|
||||
@@ -77,8 +71,6 @@
|
||||
- ansible_facts['distribution_major_version'] > "11"
|
||||
- systemd_resolved is defined and systemd_resolved|bool
|
||||
|
||||
|
||||
|
||||
- import_tasks: tor.yml
|
||||
when:
|
||||
- inventory_hostname in groups['mail_server']
|
||||
@@ -99,10 +91,9 @@
|
||||
when:
|
||||
- ansible_facts['distribution'] == "Debian"
|
||||
tags:
|
||||
- shell-config
|
||||
- vim-config
|
||||
- zsh-config
|
||||
|
||||
- shell-config
|
||||
- vim-config
|
||||
- zsh-config
|
||||
|
||||
# tags supported inside users.yml:
|
||||
#
|
||||
@@ -118,7 +109,6 @@
|
||||
tags:
|
||||
- users
|
||||
|
||||
|
||||
# tags supported inside users-systemfiles.yml:
|
||||
#
|
||||
# bash
|
||||
@@ -129,7 +119,6 @@
|
||||
- users
|
||||
- users-systemfiles
|
||||
|
||||
|
||||
# tags supported inside webadmin-user.yml:
|
||||
#
|
||||
# users-exists
|
||||
@@ -145,14 +134,12 @@
|
||||
- users-systemfiles
|
||||
- webadmin
|
||||
|
||||
|
||||
# tags supported inside sshd.yml
|
||||
#
|
||||
# sshd-config
|
||||
- import_tasks: sshd.yml
|
||||
tags: sshd
|
||||
|
||||
|
||||
# tags supported inside sudoers.yml:
|
||||
#
|
||||
# sudoers-remove
|
||||
@@ -161,11 +148,9 @@
|
||||
- import_tasks: sudoers.yml
|
||||
tags: sudoers
|
||||
|
||||
|
||||
- import_tasks: motd.yml
|
||||
tags: motd
|
||||
|
||||
|
||||
# tags supported inside ntp.yml:
|
||||
#
|
||||
# ntp-server
|
||||
@@ -175,7 +160,6 @@
|
||||
when:
|
||||
- "'lxc_guest' not in group_names"
|
||||
|
||||
|
||||
# tags supportetd inside git.yml
|
||||
#
|
||||
# git-firewall-repository
|
||||
@@ -198,7 +182,6 @@
|
||||
- import_tasks: git.yml
|
||||
tags: git
|
||||
|
||||
|
||||
# tags supported inside nfs.yml:
|
||||
#
|
||||
# nfs-server
|
||||
@@ -207,7 +190,6 @@
|
||||
tags:
|
||||
- nfs
|
||||
|
||||
|
||||
# tags supported inside x2go-server.yml:
|
||||
#
|
||||
# x2go-server
|
||||
@@ -216,7 +198,6 @@
|
||||
tags:
|
||||
- x2go
|
||||
|
||||
|
||||
# tags supported inside copy_files.yml:
|
||||
#
|
||||
# copy-files
|
||||
@@ -233,7 +214,6 @@
|
||||
tags:
|
||||
- symlink-files
|
||||
|
||||
|
||||
# tags supported inside config_files_mailsystem_scripts.yml:
|
||||
#
|
||||
- import_tasks: config_files_mailsystem_scripts.yml
|
||||
@@ -277,8 +257,8 @@
|
||||
|
||||
- import_tasks: redis-server.yml
|
||||
when: inventory_hostname in groups['nextcloud_server'] or
|
||||
inventory_hostname in groups['apache2_webserver'] or
|
||||
inventory_hostname in groups['nginx_webserver']
|
||||
inventory_hostname in groups['apache2_webserver'] or
|
||||
inventory_hostname in groups['nginx_webserver']
|
||||
tags:
|
||||
- redis-server
|
||||
|
||||
@@ -299,10 +279,8 @@
|
||||
tags:
|
||||
- services
|
||||
|
||||
|
||||
- import_tasks: systemd-services_redhat_based_OS.yml
|
||||
when:
|
||||
- ansible_facts.os_family == "RedHat"
|
||||
tags:
|
||||
- services
|
||||
|
||||
|
||||
Reference in New Issue
Block a user