diff --git a/playbook.yml b/playbook.yml deleted file mode 100644 index 7b28912..0000000 --- a/playbook.yml +++ /dev/null @@ -1,57 +0,0 @@ ---- - -# Intended to be run once for every new server to secure the ssh connection allowing the team access -# with their public keys. This script will lock itself out from every server it is run on. -# Further playbooks are intended to be run by logging in as one of the created users. -# It also ensures python2 is installed as it's necessary for the modules used in this playbook at -# the time of this writing. - -# The used login data depends on the used server provider. In most cases the ansible_user will be -# root, but we can't safely assume anything. -# The following line is an example for securing a new vagrant maching, after running `vagrant up`: -# ansible-playbook first_run.yml -i hosts -u vagrant --private-key='~/.vagrant.d/insecure_private_key' -# For real providers it could look like: -# ansible-playbook first_run.yml -i hosts -u root --private-key='~/.ssh/id_rsa' -# If you don't have a ssh-key on the server and the server expects password authentication use: -# ansible-playbook first_run.yml -i hosts -u root --ask-pass - -# - hosts: all -# strategy: free -# -## vars_prompt: -## -## - name: ansible_become_password -## prompt: "Give your local Password here:" -# -# roles: -# - common - -- hosts: ansible_dependencies - strategy: free - gather_facts: false - - roles: - - ansible_dependencies-ubuntu-noble - - ansible_user_debian - -- hosts: initial_setup - strategy: free - -# vars_prompt: -# -# - name: ansible_become_password -# prompt: "Give your local Password here:" - - roles: - - ubuntu-server - -# - hosts: debian-server -# strategy: free -# -## vars_prompt: -## -## - name: ansible_become_password -## prompt: "Give your local Password here:" -# -# roles: -# - common diff --git a/test-01.sh b/test-01.sh deleted file mode 100755 index 6a5aeaf..0000000 --- a/test-01.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - - -VARS_FILE=$1 - -yq -P e "$(for v in $(grep '\!vault' $VARS_FILE | cut -d: -f1); do val=$(yq e .${v} $VARS_FILE | tr -d ' ' | ansible-vault decrypt); echo .$v = \"$val\" \|; done) null = null" $VARS_FILE - - -exit 0 diff --git a/test.sh b/test.sh deleted file mode 100755 index 2252a6b..0000000 --- a/test.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -for v in $(grep '\!vault' $1 | cut -d: -f1); do - val=$(yq e .${v} $1 | tr -d ' ' | ansible-vault decrypt) - echo $v = \"$val\" -done - -exit - -yq -P e "$(for v in $(grep '\!vault' $VARS_FILE | cut -d: -f1); do val=$(yq e .${v} $VARS_FILE | tr -d ' ' | ansible-vault decrypt); echo .$v = \"$val\" \|; done) null = null" $VARS_FILE diff --git a/test.yml b/test.yml deleted file mode 100644 index 9789c47..0000000 --- a/test.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- - -- hosts: test.mariadb.oopen.de - - tasks: - - - getent: - database: passwd - fail_key: false - key: chis - - - debug: - msg: User cris not available - when: getent_passwd.cris is not defined diff --git a/upgrade.yml b/upgrade.yml deleted file mode 100644 index 60f3488..0000000 --- a/upgrade.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -- hosts: debian - become: yes - - tasks: - - - name: Update packages list - apt: update_cache=yes - when: ansible_facts.os_family == 'Debian' - - - name: List packages to upgrade (1/2) - shell: aptitude -q -F%p --disable-columns search "~U" - register: updates - changed_when: False - when: ansible_facts.os_family == 'Debian' - - - name: List packages to upgrade (2/2) - debug: msg="{{ updates.stdout_lines | count }} packages to upgrade ({{ updates.stdout_lines | join(', ') }})" - when: (ansible_facts.os_family == 'Debian' and updates.stdout_lines) - - - name: Upgrade packages - apt: upgrade=safe - when: ansible_facts.os_family == 'Debian' - - - name: Check what the new version is - shell: lsb_release -r | awk '{print $2}' - changed_when: False - register: new_release - - - name: /jessie/ install the needrestart package if it is missing - apt: name=needrestart state=present default_release=jessie-backports - when: ansible_distribution_release == 'jessie' - - - name: /jessie/ list services to restart (1/3) - shell: needrestart -blrl | awk '/^NEEDRESTART-SVC/{print $2}' - register: services - changed_when: False - when: ansible_distribution_release == 'jessie' - -# - name: /jessie/ merge services list (2/3) -# set_fact: -# services: "{{ services }}" - -# - name: list services to restart (3/3) -# debug: msg="{{ services.stdout_lines | count }} services to restart ({{ services.stdout_lines | join (", ") }})" -# when: (ansible_facts.os_family == 'Debian' and services.stdout_lines) - -# - name: list services to restart (2/3) -# debug: msg="{{ services.stdout_lines | count }} services to restart ({{ services.stdout_lines | join (", ") }})" -# when: (ansible_facts.os_family == 'Debian' and services.stdout_lines) - - - name: cache cleanup - shell: apt-get autoclean diff --git a/zzz.txt b/zzz.txt deleted file mode 100644 index e798d60..0000000 --- a/zzz.txt +++ /dev/null @@ -1,6 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -35613761666536306430613261616634356134333137396661663261336231626233383334663463 -3134376265353534383336323166393232326330306134630a343036363439393461663532396233 -39653866646161386236626261643634613564666536386664356231396636376130643536326662 -3064393033353962370a303035633266623736316564383538656136646266343361313965396331 -6239