From 4df5ce21ffbbacaf5c931174c5a6be8778641f6b Mon Sep 17 00:00:00 2001 From: defanor Date: Sun, 10 Jun 2018 11:55:30 +0300 Subject: Add ansible configuration --- .ansible.cfg | 2 ++ .ansible/README | 16 ++++++++++++++++ .ansible/personalised.yml | 19 +++++++++++++++++++ .config/pancake/config.yaml | 6 ++++-- 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 .ansible.cfg create mode 100644 .ansible/README create mode 100644 .ansible/personalised.yml diff --git a/.ansible.cfg b/.ansible.cfg new file mode 100644 index 0000000..1c8ba09 --- /dev/null +++ b/.ansible.cfg @@ -0,0 +1,2 @@ +[defaults] +inventory = ~/.ansible/hosts diff --git a/.ansible/README b/.ansible/README new file mode 100644 index 0000000..a753811 --- /dev/null +++ b/.ansible/README @@ -0,0 +1,16 @@ +personalised.yaml is a basic ansible playbook to personalise the +servers I work with, used with ansible 2.5.3. + +ssh-agent should be running, host_vars should be set with +ansible-vault, e.g.: + + ansible-vault create host_vars/example.com.yaml + +With contents such as: + + ansible_become_password: examplepassword + +Invoked with: + + ansible-playbook --ask-vault-pass ~/.ansible/personalised.yml + diff --git a/.ansible/personalised.yml b/.ansible/personalised.yml new file mode 100644 index 0000000..3db2bc7 --- /dev/null +++ b/.ansible/personalised.yml @@ -0,0 +1,19 @@ +- hosts: personalised + tasks: + - name: Ensure emacs is installed on CentOS + become: yes + yum: + name: emacs-nox + state: latest + when: ansible_os_family == "RedHat" + - name: Ensure emacs is installed on Debian + become: yes + apt: + name: emacs25-nox + state: latest + when: ansible_os_family == "Debian" + - name: Set emacs as EDITOR for myself + lineinfile: + path: ~/.profile + regexp: '^export EDITOR=' + line: 'export EDITOR=emacs' diff --git a/.config/pancake/config.yaml b/.config/pancake/config.yaml index 0e8278d..e469039 100644 --- a/.config/pancake/config.yaml +++ b/.config/pancake/config.yaml @@ -24,7 +24,7 @@ externalViewers: png: xdg-open "${FILE}" indentDivs: false commands: - gopher: ! 'curl "${URI}" -w " + gopher: ! 'torify curl "${URI}" -w " -pancake- @@ -51,6 +51,7 @@ shortcuts: gp: gopher://gopherpedia.com:70/7/lookup? vs: gopher://gopher.floodgap.com/7/v2/vs? xiph: http://dir.xiph.org/search?search= + cs: http://citeseerx.ist.psu.edu/search?q= hoogle: https://www.haskell.org/hoogle/?hoogle= unclutter: hacker-news: ^https://news\.ycombinator\.com/((news|show|ask).*)?$ @@ -60,7 +61,7 @@ unclutter: hoogle: ^https://www\.haskell\.org/hoogle/\?hoogle= hackage-haddock: ^https?://hackage\.haskell\.org/package/[^/]+/docs/[^/]+$ mediawiki: ^https://en\.(m.)?(wiktionary|wikipedia)\.org/wiki/ -defaultCommand: ! 'curl --compressed -4 -L -w " +defaultCommand: ! 'curl -A "pancake/${PANCAKE}" --compressed -4 -L -w " -pancake- @@ -71,3 +72,4 @@ defaultCommand: ! 'curl --compressed -4 -L -w " " "${URI}"' historyDepth: 100 paginate: true +pandocTimeout: 60 -- cgit v1.2.3