From 714f726bb31f4bad12b71846d2ee0b03ccf67f3a Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 9 Apr 2016 22:44:28 -0400 Subject: common: small changes - add tree and linux-util - rename "extras" to "extrapkg" - add a gitconfig for root (for etckeeper) --- roles/common/defaults/main.yml | 1 + roles/common/tasks/extrapkg.yml | 17 +++++++++++++++++ roles/common/tasks/extras.yml | 12 ------------ roles/common/tasks/main.yml | 9 +++++++-- roles/common/templates/root_gitconfig.j2 | 5 +++++ 5 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 roles/common/tasks/extrapkg.yml delete mode 100644 roles/common/tasks/extras.yml create mode 100644 roles/common/templates/root_gitconfig.j2 (limited to 'roles') diff --git a/roles/common/defaults/main.yml b/roles/common/defaults/main.yml index 22287b0..642f58e 100644 --- a/roles/common/defaults/main.yml +++ b/roles/common/defaults/main.yml @@ -4,6 +4,7 @@ # This is a reference of all the variables. ############################################################################### +hostname_fqdn: "{{ ansible_fqdn }}" common_timezone: 'Etc/UTC' # domain: (required) # main_user_name: (required) diff --git a/roles/common/tasks/extrapkg.yml b/roles/common/tasks/extrapkg.yml new file mode 100644 index 0000000..0836912 --- /dev/null +++ b/roles/common/tasks/extrapkg.yml @@ -0,0 +1,17 @@ +--- +- name: Install extras that Everybody wants + apt: pkg={{ item }} state=installed + with_items: + - ack-grep + - alpine + - build-essential + - cowsay + - ctorrent + - figlet + - ipython + - ipython3 + - lynx + - manpages-dev + tags: + - dependencies + diff --git a/roles/common/tasks/extras.yml b/roles/common/tasks/extras.yml deleted file mode 100644 index 9a4bd2f..0000000 --- a/roles/common/tasks/extras.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: Install extras that Everybody wants - apt: pkg={{ item }} state=installed - with_items: - - build-essential - - cowsay - - figlet - - ipython - - ipython3 - tags: - - dependencies - diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 58b71b2..a4818b0 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -57,15 +57,17 @@ - screen - sudo - tcpdump + - tree - unzip - unattended-upgrades + - util-linux - vim-nox - wget tags: - dependencies - name: Create /srv directory - file: path=/src/http/cgit + file: path=/srv state=directory owner=root group=root @@ -91,7 +93,10 @@ - name: Apticron email configuration template: src=apticron.conf.j2 dest=/etc/apticron/apticron.conf +- name: gitconfig for root user (etckeeper will complain) + template: src=root_gitconfig.j2 dest=/root/.gitconfig + #- include: users.yml tags=users - include: security.yml tags=security - include: ntp.yml tags=ntp -- include: extras.yml tags=extras +- include: extrapkg.yml tags=extrapkg diff --git a/roles/common/templates/root_gitconfig.j2 b/roles/common/templates/root_gitconfig.j2 new file mode 100644 index 0000000..90c7151 --- /dev/null +++ b/roles/common/templates/root_gitconfig.j2 @@ -0,0 +1,5 @@ + git config --global user.name "Your Name" + git config --global user.email you@example.com +[user] + name = root + email = root@{{ hostname_fqdn }} -- cgit v1.2.3