From 60c3ab0403c5be53b1a85048416fae0f8daadc8d Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Fri, 15 May 2020 16:52:47 +0200 Subject: [PATCH] inventory: up-to-date, split by server/client, enhance some auth in roles --- global.yml | 46 +++++++++++++++++++-------------- gnupg.yml | 3 +-- redshift.yml | 2 +- roles/gnupg/tasks/main.yml | 3 +++ roles/tmux/tasks/.main.yml.swp | Bin 12288 -> 0 bytes roles/tmux/tasks/main.yml | 3 +++ tmux.yml | 2 +- vim.yml | 2 +- 8 files changed, 37 insertions(+), 24 deletions(-) delete mode 100644 roles/tmux/tasks/.main.yml.swp diff --git a/global.yml b/global.yml index b30f101..7f2fe39 100644 --- a/global.yml +++ b/global.yml @@ -2,34 +2,42 @@ all: hosts: + iodine: + ansible_host: iodine.int.finallycoffee.eu + ansible_user: jdreichmann + ansible_become_user: jdreichmann + ansible_become: true carbon: ansible_host: carbon.int.finallycoffee.eu - iron: - ansible_host: iron.int.finallycoffee.eu - platinum: - ansible_host: platinum.int.finallycoffee.eu - xenon: - ansible_host: xenon.int.finallycoffee.eu - yttrium: - ansible_host: yttrium.int.finallycoffee.eu +# iron: +# ansible_host: iron.int.finallycoffee.eu +# platinum: +# ansible_host: platinum.int.finallycoffee.eu +# xenon: +# ansible_host: xenon.int.finallycoffee.eu +# yttrium: +# ansible_host: yttrium.int.finallycoffee.eu + + munich: + ansible_host: munich.finallycoffee.eu + ansible_user: jdreichmann + ansible_become_user: jdreichmann + ansible_become: true vars: ansible_user: transcaffeine ansible_become_user: transcaffeine ansible_become: true -gnupg: - hosts: - all: -redshift: +servers: hosts: - all: + iodine: + munich: +# iron: +# platinum: -tmux: +clients: hosts: - all: - -vim: - hosts: - all: +# carbon: +# xenon: diff --git a/gnupg.yml b/gnupg.yml index cd2ae7a..5696855 100644 --- a/gnupg.yml +++ b/gnupg.yml @@ -1,8 +1,7 @@ --- - name: Sets up gpg and the configs for using it as a ssh-agent - #connection: local - hosts: gnupg + hosts: all become: true roles: - gnupg diff --git a/redshift.yml b/redshift.yml index 21ef9f3..aaf462c 100644 --- a/redshift.yml +++ b/redshift.yml @@ -1,7 +1,7 @@ --- - name: Sets up redshift and creates an autostart file - hosts: redshift + hosts: clients become: true roles: - redshift diff --git a/roles/gnupg/tasks/main.yml b/roles/gnupg/tasks/main.yml index 872b566..1fb1d1b 100644 --- a/roles/gnupg/tasks/main.yml +++ b/roles/gnupg/tasks/main.yml @@ -5,6 +5,9 @@ package: name: gnupg2 state: latest + become: yes + become_user: root + become_method: sudo when: ansible_os_family == "RedHat" ignore_errors: true diff --git a/roles/tmux/tasks/.main.yml.swp b/roles/tmux/tasks/.main.yml.swp deleted file mode 100644 index da76f1107b38d8521da59505cd8193e41d20976a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI&y-ve05C?F#5*uHF7cd~PC27lox~@<)Wl;smi2{OyOT$KDvsWutOW=Lg{dv zXLDVUfB*y*6If#ht!Bg5?(OdI?X9!L+Mo&o5P$##AOHafKmY;|SV{p`*4Q;oUazKK zt@hfly*grp00bZa0SG_<0uX=z1Rwwb2tZ&71w_Kw>pEk{8#Fxq|Nr^?|4!#OiYJOk ziU*2&iaUx4g`wzCbSS2^OZeL{G6Wz10SG_<0uX=z1Rwwb2teRp0-RPNt!wj16#6^t zVO;2x`Ls20n}4Ok%NAvw%*#wT*=7OPBA0D`T4lJeQv>er#B-%x!7qwj^0dejY1pix t^Od|b(n{^7saX&IC3GxBJQRa(y*t{DjGWHEm8GuM(KUTZ&;3CVun#aEa%uno diff --git a/roles/tmux/tasks/main.yml b/roles/tmux/tasks/main.yml index 1d75f9b..3a1ba68 100644 --- a/roles/tmux/tasks/main.yml +++ b/roles/tmux/tasks/main.yml @@ -4,6 +4,9 @@ package: name: tmux state: present + become: yes + become_user: root + become_method: sudo ignore_errors: true - name: Template config file into home folder diff --git a/tmux.yml b/tmux.yml index 4a91874..d782211 100644 --- a/tmux.yml +++ b/tmux.yml @@ -1,7 +1,7 @@ --- - name: Set up tmux - hosts: tmux + hosts: all become: true roles: - tmux diff --git a/vim.yml b/vim.yml index a339248..3d4b5f6 100644 --- a/vim.yml +++ b/vim.yml @@ -1,7 +1,7 @@ --- - name: Install vim and copy color scheme and template its config - hosts: vim + hosts: all become: true roles: - vim