Changeset - 794272b6e82a
[Not reviewed]
0 4 0
x - 21 months ago 2023-08-24 01:11:47
xbr@c3l.lu
feat: use groups for the playbooks
4 files changed with 7 insertions and 4 deletions:
0 comments (0 inline, 0 general)
gateway/all_gw_config.yml
Show inline comments
 
---
 
# Defining the remote server where the package will be deployed
 
- name: "Deploy new gateway config"
 
  hosts: test
 
  hosts: gateway
 
  remote_user: root
 
  become: true
 
  become_method: ansible.builtin.sudo
 
  tasks:
 

	
 
    # Network interfaces
 
    - name: Setup network interfaces (bridge + bat0)
 
      ansible.builtin.copy:
 
        src: "{{ server_config_dir }}/interface/freifunk.j2"
 
        dest: /etc/network/interfaces.d/freifunk
 
        owner: root
 
        group: root
gateway/initial_gw_setup.yml
Show inline comments
 
---
 
- name: Initial Gateway Setup
 
  hosts: test
 
  hosts: initial
 
  become: true
 
  become_method: ansible.builtin.sudo
 

	
 
  tasks:
 
    # Update packages
 
    - name: Update all packages to their latest version
 
      ansible.builtin.apt:
 
        update_cache: true
 
        upgrade: "yes"
 
      tags: update
 
    - name: Install a list of packages
 
      ansible.builtin.apt:
hosts
Show inline comments
 
@@ -15,38 +15,41 @@ fflux-test
 
#ipv6=fd4e:f2d7:88d2:fffe::19
 
#vars_files: /etc/ansible/host_vars/firmware.freifunk.lu
 

	
 
# all machine variables come here
 
[all:vars]
 
ansible_python_interpreter=/usr/bin/python3
 
ansible_ssh_private_key_file=/home/fflux/.ssh/fflux_fflux
 
server_config_dir=~/repos/Infrastructure-Intern/server_config
 
server_scripts_dir=~/repos/Infrastructure-Intern/scripts
 

	
 
# new machine come here
 
[initial]
 
#fflux-test
 
fflux-test
 

	
 
# machines which run api.freifunk.lu
 
[API]
 

	
 
# machines which run map.freifunk.lu
 
[MAP]
 

	
 
# machines which run stats.freifunk.lu
 
[STATS]
 

	
 
# machines which run firmware.freifunk.lu
 
[FIRMWARE]
 

	
 
# machines which run freifunk.lu
 
[WORDPRESS]
 

	
 
# machine which are gateways for freifunk.lu
 
[fflux]
 

	
 
[gateway]
 
fflux-test
 

	
 
[gw1]
 

	
 
[gw2]
 

	
 
[gw3]
 

	
initial_server_setup/initial_setup.yml
Show inline comments
 
---
 
- name: Initial Server Setup
 
  hosts: test
 
  hosts: initial
 
  become: true
 

	
 
  vars_files:
 
    - ../user_vars.yml
 
  vars:
 
    password: Welcome1234
 

	
 
  tasks:
 
    - name: Update + Upgrade packages
 
      ansible.builtin.apt:
 
        upgrade: true
 
        update_cache: true
0 comments (0 inline, 0 general)