Skip to content

Commit

Permalink
Add support for setting up ansible-galaxy on the controller node
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Jul 12, 2024
1 parent 1fde7ff commit 24d32b0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions ansible/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- src: willshersystems.sshd
16 changes: 16 additions & 0 deletions ansible/roles/ansible_controller/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
ansible.builtin.hostname:
name: "ansible-controller"

- name: create ansible roles directory
ansible.builtin.file:
state: directory
path: /etc/ansible/roles
recurse: yes
owner: ubuntu
group: admin
mode: "u=rwX,g=rwX,o=r"

- name: clone devops repo into /srv/devops
ansible.builtin.git:
repo: "https://github.com/ooni/devops.git"
Expand All @@ -30,6 +39,13 @@
group: admin
mode: "u=rwX,g=rwX,o=r"

- name: Install ansible galaxy dependencies
become: yes
become_user: ubuntu
ansible.builtin.shell:
cmd: ansible-galaxy install -r requirements.yml
chdir: /srv/devops/ansible

- name: set global gitconfig for each user
ansible.builtin.copy:
dest: "/home/{{ item }}/.gitconfig"
Expand Down
Empty file.

0 comments on commit 24d32b0

Please sign in to comment.