Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4740c48
Updating paths in meta roles.
gregharvey Nov 10, 2023
41f1e5b
Excluding wazuh role from linting.
gregharvey Nov 10, 2023
fb4cf5f
Removing exclusion from CI because it's in .ansible-lint.
gregharvey Nov 10, 2023
26c9408
Adding debian readme to complete sidebar in docs.
gregharvey Nov 10, 2023
a9a3c59
Merge branch '2.x' into meta_role_paths-PR-2.x
gregharvey Nov 10, 2023
1be52fe
Merge branch 'meta_role_paths' into meta_role_paths-PR-2.x
gregharvey Nov 10, 2023
b6ebf17
Being more generic with Python version for venv to avoid Debian versi…
gregharvey Nov 10, 2023
ba4f996
Merge branch '2.x' into meta_role_paths-PR-2.x
gregharvey Nov 10, 2023
c6ba804
Merge branch 'meta_role_paths' into meta_role_paths-PR-2.x
gregharvey Nov 10, 2023
465b5dd
We shouldn't need to remove all the old Ansible system stuff any more.
gregharvey Nov 10, 2023
c55da9b
Merge branch '2.x' into meta_role_paths-PR-2.x
gregharvey Nov 10, 2023
fb83376
Merge branch 'meta_role_paths' into meta_role_paths-PR-2.x
gregharvey Nov 10, 2023
adf5acf
Grouping python activities together after role downloads.
gregharvey Nov 10, 2023
52642e5
Merge branch '2.x' into meta_role_paths-PR-2.x
gregharvey Nov 10, 2023
9a64963
Merge branch 'meta_role_paths' into meta_role_paths-PR-2.x
gregharvey Nov 10, 2023
c68dbed
Need a cache update to make the 'parallel' package avaiable.
gregharvey Nov 13, 2023
3a23578
Merge branch '2.x' into meta_role_paths-PR-2.x
gregharvey Nov 13, 2023
4f9c4c5
Merge branch 'meta_role_paths' into meta_role_paths-PR-2.x
gregharvey Nov 13, 2023
9296268
Updating path to ce_deploy role for galaxy requirements files.
gregharvey Nov 13, 2023
c8cb40c
Merge branch '2.x' into meta_role_paths-PR-2.x
gregharvey Nov 13, 2023
c26e05d
Merge branch 'meta_role_paths' into meta_role_paths-PR-2.x
gregharvey Nov 13, 2023
bb99e9e
For shell scripts to work Ansible's python venv needs adding to path.
gregharvey Nov 13, 2023
341f3fe
Merge branch '2.x' into meta_role_paths-PR-2.x
gregharvey Nov 13, 2023
88e3a4f
Merge branch 'meta_role_paths' into meta_role_paths-PR-2.x
gregharvey Nov 13, 2023
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
39 changes: 23 additions & 16 deletions roles/debian/ce_deploy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
system: true
groups: "{{ ce_deploy.groups }}"
when: ce_deploy.new_user

# @see https://github.com/ansible/ansible/issues/24862
- name: Ensure home ownership.
ansible.builtin.file:
Expand All @@ -36,20 +37,6 @@
dest: "{{ _ce_provision_data_dir }}"
src: "/home/{{ ce_deploy.username }}/.ssh/{{ ce_deploy.key_name }}"

# Install Python applications.
- name: Set up Python venv variables.
ansible.builtin.set_fact:
_venv_path: "{{ ce_deploy.venv_path }}"
_venv_command: "{{ ce_deploy.venv_command }}"

- name: Install Ansible.
ansible.builtin.include_role:
name: debian/ansible

- name: Install python_boto.
ansible.builtin.include_role:
name: debian/python_boto

- name: Ensure Git is installed.
ansible.builtin.apt:
pkg: "git"
Expand Down Expand Up @@ -118,7 +105,7 @@
- ansible.cfg
when: ce_deploy_has_config_repo

- name: Symlink config folders to /etc/ansible.
- name: Symlink config folders to ce-deploy root.
ansible.builtin.file:
dest: "{{ ce_deploy.local_dir }}/{{ item }}"
src: "{{ ce_deploy.local_dir }}/config/{{ item }}"
Expand All @@ -133,13 +120,33 @@
path: "{{ ce_deploy.local_dir }}/data"
state: directory

- name: Ensure ownership of Ansible folder.
- name: Ensure ownership of ce-deploy folder.
ansible.builtin.file:
path: "{{ ce_deploy.local_dir }}"
state: directory
owner: "{{ ce_deploy.username }}"
recurse: true

# Install Python applications.
- name: Set up Python venv variables.
ansible.builtin.set_fact:
_venv_path: "{{ ce_deploy.venv_path }}"
_venv_command: "{{ ce_deploy.venv_command }}"

- name: Install Ansible.
ansible.builtin.include_role:
name: debian/ansible

- name: Install python_boto.
ansible.builtin.include_role:
name: debian/python_boto

- name: Add Python virtual environment to $PATH.
ansible.builtin.copy:
dest: /etc/profile.d/ansible-path.sh
content: "PATH=$PATH:{{ _venv_path }}/bin"
force: true

- name: Check if ansible-galaxy custom requirements file exists.
ansible.builtin.stat:
path: "{{ ce_deploy.galaxy_custom_requirements_file }}"
Expand Down
6 changes: 6 additions & 0 deletions roles/debian/ce_provision/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@
become: true
become_user: "{{ ce_provision.username }}"

- name: Add Python virtual environment to $PATH.
ansible.builtin.copy:
dest: /etc/profile.d/ansible-path.sh
content: "PATH=$PATH:{{ _venv_path }}/bin"
force: true

- name: Check if ansible-galaxy custom requirements file exists.
ansible.builtin.stat:
path: "{{ ce_provision.galaxy_custom_requirements_file }}"
Expand Down