Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for setting up ansible-galaxy on the controller node #75

Merged
merged 6 commits into from
Jul 21, 2024
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
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
17 changes: 17 additions & 0 deletions ansible/roles/ansible_controller/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,23 @@
- "python3-boto3"
- "tmux"
- "vim"
- "acl"
state: "latest"
update_cache: "yes"

- name: set the hostname
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 +40,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 -p /etc/ansible/roles -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.
Loading