Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Configure and operate a basic cloud-native service: running anything from cypto
| _binary_strip_components_ | Strip NUMBER leading components/directories from file names on extraction | `0` |
| _destination_directory_ | directory where the binary file will be placed after downloading/extracting | `/usr/local/bin` |
| _systemd_ | custom service type & unit, service and install properties | `{}` |
| _systemd.enable_network_accounting_ | enable IP accounting for network traffic tracking | `true` |
| _systemd.enable_accounting_ | enable systemd resource accounting (CPU, Memory, IO, Tasks, IP) | `true` |

### Kubernetes (k8s)

Expand Down Expand Up @@ -124,7 +124,7 @@ collections:
ingressPort: 51820
servicePort: 51820
systemd:
enable_network_accounting: true
enable_accounting: true
service_properties:
ExecStop: /usr/local/bin/wg-quick down wg0
Restart: on-failure
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ systemd: {}
# unit_properties: {}
# service_properties: {}
# install_properties: {}
# enable_network_accounting: true
# enable_accounting: true

systemd_environment_directive: ""

Expand Down
2 changes: 1 addition & 1 deletion tasks/common/custom-facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
'MemoryHigh': memory,
'Restart': restart_policy
}
| combine((systemd.enable_network_accounting | default(true)) | ternary({'IPAccounting': 'yes'}, {}), recursive=True)
| combine((systemd.enable_accounting | default(true)) | ternary({'CPUAccounting': 'yes', 'MemoryAccounting': 'yes', 'IOAccounting': 'yes', 'TasksAccounting': 'yes', 'IPAccounting': 'yes'}, {}), recursive=True)
}}
_default_unit_install:
WantedBy: multi-user.target
Expand Down
1 change: 1 addition & 0 deletions tests/molecule/container-basic/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ provisioner:
prepare: ../prepare-docker.yml
env:
ANSIBLE_ROLES_PATH: "../../../../"
ANSIBLE_ALLOW_BROKEN_CONDITIONALS: "True"
verifier:
name: testinfra
directory: ./tests
Expand Down
1 change: 1 addition & 0 deletions tests/molecule/container-full/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ provisioner:
prepare: ../prepare-docker.yml
env:
ANSIBLE_ROLES_PATH: "../../../../"
ANSIBLE_ALLOW_BROKEN_CONDITIONALS: "True"
verifier:
name: testinfra
directory: ./tests
Expand Down
1 change: 1 addition & 0 deletions tests/molecule/container-uninstall/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ provisioner:
prepare: ../prepare-docker.yml
env:
ANSIBLE_ROLES_PATH: "../../../../"
ANSIBLE_ALLOW_BROKEN_CONDITIONALS: "True"
verifier:
name: testinfra
directory: ./tests
Expand Down
2 changes: 1 addition & 1 deletion tests/molecule/prepare-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
raw: apk add --no-cache sudo python3 py3-pip

- name: Install python dependencies
raw: pip install pytest-testinfra molecule-docker
raw: pip3 install --break-system-packages --ignore-installed PyYAML pytest-testinfra molecule-docker
2 changes: 1 addition & 1 deletion tests/molecule/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
raw: apt-get install -y sudo python3 python3-pip iptables

- name: Install python dependencies
raw: pip install pytest-testinfra molecule-docker
raw: pip3 install --break-system-packages --ignore-installed PyYAML pytest-testinfra molecule-docker
1 change: 1 addition & 0 deletions tests/molecule/systemd-basic/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ provisioner:
prepare: ../prepare.yml
env:
ANSIBLE_ROLES_PATH: "../../../../"
ANSIBLE_ALLOW_BROKEN_CONDITIONALS: "True"
verifier:
name: testinfra
directory: ./tests
Expand Down
2 changes: 1 addition & 1 deletion tests/molecule/systemd-full/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
ingressPort: 9090
servicePort: 9090
systemd:
enable_network_accounting: true
enable_accounting: true
1 change: 1 addition & 0 deletions tests/molecule/systemd-full/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ provisioner:
prepare: ../prepare.yml
env:
ANSIBLE_ROLES_PATH: "../../../../"
ANSIBLE_ALLOW_BROKEN_CONDITIONALS: "True"
verifier:
name: testinfra
directory: ./tests
Expand Down
1 change: 1 addition & 0 deletions tests/molecule/systemd-uninstall/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ provisioner:
prepare: ../prepare.yml
env:
ANSIBLE_ROLES_PATH: "../../../../"
ANSIBLE_ALLOW_BROKEN_CONDITIONALS: "True"
verifier:
name: testinfra
directory: ./tests
Expand Down
Loading