Skip to content

Add bashrc commands to ansible playbook #4

Description

@trevorbryant

Need to configure the custom lines into .bashrc. Currently have the below.

- name: update-bashrc
  hosts: localhost
  connection: local
  become: true
  ignore_errors: true
  tasks:
    - name: run commands
      command: "{{ item }}"
      with_items:
        - "echo export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$' >> ~/.bashrc"
        - "echo export GOPATH=\$HOME/.go/ >> ~/.bashrc"
        - "echo export GOBIN=\$HOME/.go/bin >> ~/.bashrc"
        - "echo export PATH=\$PATH:\$GOBIN >> ~/.bashrc"
  tags:
    - update-bashrc

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions