Skip to content
Snippets Groups Projects
Commit f2d72823 authored by Nathan Rodet's avatar Nathan Rodet
Browse files

removed ansible for main branch branch

parent 4ba473e8
No related branches found
No related tags found
No related merge requests found
Pipeline #78420 failed
[defaults]
host_key_checking = False
inventory = ./hosts.yaml
instances:
hosts:
dev-0.cma.alpha.grandlyon.com:
\ No newline at end of file
---
# This playbook is used to update and upgrade apt packages on all instances
- name: "Apply updates and upgrades to all instances"
become: yes
become_method: sudo
remote_user: root
hosts: instances
tasks:
- name: "Update instances"
register: output
apt:
update_cache: yes
cache_valid_time: 86400
upgrade: dist
autoremove: yes
- debug: msg="{{ output.stdout }}"
- debug: msg="{{ output.stderr }}"
#!/bin/bash
# Create hosts.yaml file with base configuration
echo "instances:
hosts:" > ./hosts.yaml
# Add host url for each instance
for ((i=0; i<=$INSTANCE_COUNT; i++)); do
echo " ${ENVIRONMENT}-${i}.cma.alpha.grandlyon.com:" >> ./hardening-scripts/ansible/hosts.yaml
done
\ No newline at end of file
variable "ENVIRONMENT" {
type = string
description = "Environment of the deployment, contained in domains, subdomains and resources name convention"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment